bobbingwide / oik

OIK Information Kit
https://www.oik-plugins.com/oik-plugins/oik
GNU General Public License v2.0
2 stars 0 forks source link

Fatal error attempting to view bw_plug link parameter in s.b/oikcom #225

Closed bobbingwide closed 7 months ago

bobbingwide commented 7 months ago

https://s.b/oikcom/oik_sc_param/bw_plug-link-parameter/ post 4846

Fatal error: Uncaught Error: Call to undefined function oik__example() in C:\apache\htdocs\wordpress\wp-content\plugins\oik\shortcodes\oik-codes.php:684 Stack trace:

#0 C:\apache\htdocs\wordpress\wp-content\plugins\oik\libs\oik-sc-help.php(159): bw_code__example('bw_code', NULL)
bobbingwide/bobbingwide#1 C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\libs\bobbfunc.php(919): bw_lazy_sc_example('bw_code', NULL)
bobbingwide/bobbingwide#2 C:\apache\htdocs\oikcom\wp-includes\class-wp-hook.php(324): bw_sc_example('bw_code')
bobbingwide/bobbingwide#3 C:\apache\htdocs\oikcom\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
bobbingwide/bobbingwide#4 C:\apache\htdocs\oikcom\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
bobbingwide/bobbingwide#5 C:\apache\htdocs\wordpress\wp-content\plugins\oik\shortcodes\oik-codes.php(303): do_action('bw_sc_example', 'bw_code')
bobbingwide/bobbingwide#6 C:\apache\htdocs\wordpress\wp-content\plugins\oik\shortcodes\oik-codes.php(323): bw_code(Array)
bobbingwide/bobbingwide#7 C:\apache\htdocs\wordpress\wp-content\plugins\oik\libs\oik-shortcodes.php(230): bw_code(Array, '', 'bw_code')
bobbingwide/bobbingwide#8 C:\apache\htdocs\oikcom\wp-includes\shortcodes.php(433): bw_shortcode_event(Array, '', 'bw_code')
bobbingwide/fizzie#52 C:\apache\htdocs\wordpress\wp-content\plugins\oik-css\includes\shortcodes-earlier.php(118): do_shortcode_tag(Array)
bobbingwide/bobbingwide#10 [internal function]: do_shortcode_tag_earlier(Array)
bobbingwide/bobbingwide#11 C:\apache\htdocs\wordpress\wp-content\plugins\oik-css\includes\shortcodes-earlier.php(95): preg_replace_callback('/\\[(\\[?)(bw_cod...', 'do_shortcode_ta...', 'link parameter ...')
bobbingwide/bobbingwide#12 C:\apache\htdocs\oikcom\wp-includes\class-wp-hook.php(324): do_shortcode_earlier('link parameter ...')
bobbingwide/bobbingwide#13 C:\apache\htdocs\oikcom\wp-includes\plugin.php(205): WP_Hook->apply_filters('link parameter ...', Array)
bobbingwide/bobbingwide#14 C:\apache\htdocs\oikcom\wp-includes\post-template.php(256): apply_filters('the_content', 'link parameter ...')
bobbingwide/bobbingwide#15 C:\apache\htdocs\wordpress\wp-content\themes\genesis\lib\structure\post.php(486): the_content()
bobbingwide/bobbingwide#16 C:\apache\htdocs\oikcom\wp-includes\class-wp-hook.php(324): genesis_do_post_content('')
bobbingwide/bobbingwide#17 C:\apache\htdocs\oikcom\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
bobbingwide/bobbingwide#18 C:\apache\htdocs\oikcom\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
bobbingwide/bobbingwide#19 C:\apache\htdocs\wordpress\wp-content\themes\genesis\lib\structure\loops.php(119): do_action('genesis_entry_c...')
#20 C:\apache\htdocs\wordpress\wp-content\themes\genesis\lib\structure\loops.php(38): genesis_standard_loop()
#21 C:\apache\htdocs\oikcom\wp-includes\class-wp-hook.php(324): genesis_do_loop('')
bobbingwide/bobbingwide#22 C:\apache\htdocs\oikcom\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
bobbingwide/bobbingwide#23 C:\apache\htdocs\oikcom\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
bobbingwide/bobbingwide#24 C:\apache\htdocs\wordpress\wp-content\themes\genesis\lib\framework.php(66): do_action('genesis_loop')
bobbingwide/bobbingwide#25 C:\apache\htdocs\wordpress\wp-content\themes\genesis-oik\single-oik_sc_param.php(64): genesis()
bobbingwide/bobbingwide#26 C:\apache\htdocs\oikcom\wp-includes\template-loader.php(106): include('C:\\apache\\htdoc...')
bobbingwide/bobbingwide#27 C:\apache\htdocs\oikcom\wp-blog-header.php(19): require_once('C:\\apache\\htdoc...')
bobbingwide/bobbingwide#28 C:\apache\htdocs\oikcom\index.php(17): require('C:\\apache\\htdoc...')
bobbingwide/bobbingwide#29 {main}
  thrown in <b>C:\apache\htdocs\wordpress\wp-content\plugins\oik\shortcodes\oik-codes.php</b> on line <b>684</b><br />
bobbingwide commented 7 months ago

The function bw_code__example() was making a call to oik__example() without first checking it was loaded. As there was a data problem with the post anyway, the easiest fix is to call function_exists first.

bobbingwide commented 7 months ago

Delivered in v4.10.1