mtekk / Breadcrumb-NavXT

The longest maintained Breadcrumb plugin for WordPress
https://mtekk.us/code/breadcrumb-navxt
51 stars 25 forks source link

Fatal error: Uncaught Error: Call to a member function get_value() on string in breadcrumb-navxt/includes/adminKit/class-mtekk_adminkit.php:538 #266

Closed jasomdotnet closed 2 years ago

jasomdotnet commented 2 years ago

I got an fatal error after an update.

PHP Warning:  include(/home/html/example.com/wp-content/plugins/wp-super-cache/wp-cache-base.php): failed to open stream: No such file or directory in /home/clients/example.com/wp-content/plugins/wp-super-cache/wp-cache.php on line 99
Warning: include(/home/html/example.com/wp-content/plugins/wp-super-cache/wp-cache-base.php): failed to open stream: No such file or directory in /home/clients/example.com/wp-content/plugins/wp-super-cache/wp-cache.php on line 99
PHP Warning:  include(/home/html/example.com/wp-content/plugins/wp-super-cache/wp-cache-base.php): failed to open stream: No such file or directory in /home/clients/example.com/wp-content/plugins/wp-super-cache/wp-cache.php on line 99
Warning: include(/home/html/example.com/wp-content/plugins/wp-super-cache/wp-cache-base.php): failed to open stream: No such file or directory in /home/clients/example.com/wp-content/plugins/wp-super-cache/wp-cache.php on line 99
PHP Warning:  include(): Failed opening '/home/html/example.com/wp-content/plugins/wp-super-cache/wp-cache-base.php' for inclusion (include_path='.:/usr/share/php') in /home/clients/example.com/wp-content/plugins/wp-super-cache/wp-cache.php on line 99
Warning: include(): Failed opening '/home/html/example.com/wp-content/plugins/wp-super-cache/wp-cache-base.php' for inclusion (include_path='.:/usr/share/php') in /home/clients/example.com/wp-content/plugins/wp-super-cache/wp-cache.php on line 99
PHP Warning:  include_once(/home/html/example.com/wp-content/plugins/wp-super-cache/ossdl-cdn.php): failed to open stream: No such file or directory in /home/clients/example.com/wp-content/plugins/wp-super-cache/wp-cache.php on line 122
Warning: include_once(/home/html/example.com/wp-content/plugins/wp-super-cache/ossdl-cdn.php): failed to open stream: No such file or directory in /home/clients/example.com/wp-content/plugins/wp-super-cache/wp-cache.php on line 122
PHP Warning:  include_once(): Failed opening '/home/html/example.com/wp-content/plugins/wp-super-cache/ossdl-cdn.php' for inclusion (include_path='.:/usr/share/php') in /home/clients/example.com/wp-content/plugins/wp-super-cache/wp-cache.php on line 122
Warning: include_once(): Failed opening '/home/html/example.com/wp-content/plugins/wp-super-cache/ossdl-cdn.php' for inclusion (include_path='.:/usr/share/php') in /home/clients/example.com/wp-content/plugins/wp-super-cache/wp-cache.php on line 122
PHP Fatal error:  Uncaught Error: Call to a member function get_value() on string in /home/clients/example.com/wp-content/plugins/breadcrumb-navxt/includes/adminKit/class-mtekk_adminkit.php:538
Stack trace:
#0 /home/clients/example.com/wp-content/plugins/breadcrumb-navxt/breadcrumb-navxt.php(603): mtekk\adminKit\adminKit::settings_to_opts(Array)
#1 /home/clients/example.com/wp-content/plugins/breadcrumb-navxt/breadcrumb-navxt.php(124): breadcrumb_navxt->get_settings()
#2 /home/clients/example.com/wp-includes/class-wp-hook.php(303): breadcrumb_navxt->init('')
#3 /home/clients/example.com/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
#4 /home/clients/example.com/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#5 /home/clients/example.com/wp-settings.php(578): do_action('init')
#6 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli in /home/clients/example.com/wp-content/plugins/breadcrumb-navxt/includes/adminKit/class-mtekk_adminkit.php on line 538
Fatal error: Uncaught Error: Call to a member function get_value() on string in /home/clients/example.com/wp-content/plugins/breadcrumb-navxt/includes/adminKit/class-mtekk_adminkit.php:538
Stack trace:
#0 /home/clients/example.com/wp-content/plugins/breadcrumb-navxt/breadcrumb-navxt.php(603): mtekk\adminKit\adminKit::settings_to_opts(Array)
#1 /home/clients/example.com/wp-content/plugins/breadcrumb-navxt/breadcrumb-navxt.php(124): breadcrumb_navxt->get_settings()
#2 /home/clients/example.com/wp-includes/class-wp-hook.php(303): breadcrumb_navxt->init('')
#3 /home/clients/example.com/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
#4 /home/clients/example.com/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#5 /home/clients/example.com/wp-settings.php(578): do_action('init')
#6 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli in /home/clients/example.com/wp-content/plugins/breadcrumb-navxt/includes/adminKit/class-mtekk_adminkit.php on line 538
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.

I reported this on Wordpress.org

mtekk commented 2 years ago

So, technically, this isn't a Breadcrumb NavXT bug, it's something else that isn't compatible with 7.0 that is causing an error (string as a setting is no longer valid in 7.0). That said, two issues were opened to address this. #264 removes the filter that is being used to cause the problem, and #260 fixes the function that isn't properly checking type before using a function in adminKit.