bobbingwide / oik-bwtrace

debug trace for WordPress
https://www.oik-plugins.com/oik-plugins/oik-bwtrace-debug-trace-for-wordpress/
GNU General Public License v2.0
6 stars 1 forks source link

Fatal error: Call to undefined function get_current_screen() in libs/class-oik-update.php #104

Closed bobbingwide closed 3 years ago

bobbingwide commented 3 years ago

When visiting https://herbmiller.me/about/online-cv/ I got this Fatal error. Also occurs in development: https://s.b/hm/about/online-cv/

Fatal error: Uncaught Error: Call to undefined function get_current_screen() in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\libs\class-oik-update.php:150 Stack trace:

#0 C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\libs\class-oik-update.php(131): oik_update::is_update_core() 
bobbingwide/bobbingwide#1 C:\apache\htdocs\hm\wp-includes\class-wp-hook.php(305): oik_update::oik_site_transient_filter_symlinked_plugins(Object(stdClass)) 
bobbingwide/bobbingwide#2 C:\apache\htdocs\hm\wp-includes\plugin.php(189): WP_Hook->apply_filters(Object(stdClass), Array) 
bobbingwide/bobbingwide#3 C:\apache\htdocs\hm\wp-includes\option.php(1945): apply_filters('site_transient_...', Object(stdClass), 'update_plugins') 
bobbingwide/bobbingwide#4 C:\apache\htdocs\hm\wp-includes\update.php(780): get_site_transient('update_plugins') 
bobbingwide/bobbingwide#5 C:\apache\htdocs\hm\wp-includes\admin-bar.php(1038): wp_get_update_data() 
bobbingwide/bobbingwide#6 C:\apache\htdocs\hm\wp-includes\class-wp-hook.php(303): wp_admin_bar_updates_menu(Object(WP_Admin_Bar)) 
bobbingwide/bobbingwide#7 C:\apache\htdocs\hm\wp-includes\class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) 
bobbingwide/bobbingwide#8 C:\apache\htdocs\hm\wp-includes\plugin.php(518): WP_Hook->do_action(Array) 
bobbingwide/fizzie#52 C:\apache\htdocs\hm\wp-includes\admin-bar.php(95): do_action_ref_array('admin_bar_menu', Array) 
bobbingwide/bobbingwide#10 C:\apache\htdocs\hm\wp-includes\class-wp-hook.php(303): wp_admin_bar_render('') 
bobbingwide/bobbingwide#11 C:\apache\htdocs\hm\wp-includes\class-wp-hook.php(327): WP_Hook->apply_filters('', Array) 
bobbingwide/bobbingwide#12 C:\apache\htdocs\hm\wp-includes\plugin.php(470): WP_Hook->do_action(Array) 
bobbingwide/bobbingwide#13 C:\apache\htdocs\hm\wp-includes\general-template.php(3047): do_action('wp_body_open') 
bobbingwide/bobbingwide#14 C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\template-canvas.php(22): wp_body_open() 
bobbingwide/bobbingwide#15 C:\apache\htdocs\hm\wp-includes\template-loader.php(106): include('C:\\apache\\htdoc...') 
bobbingwide/bobbingwide#16 C:\apache\htdocs\hm\wp-blog-header.php(19): require_once('C:\\apache\\htdoc...') 
bobbingwide/bobbingwide#17 C:\apache\htdocs\hm\index.php(17): require('C:\\apache\\htdoc...') 
bobbingwide/bobbingwide#18 {main} thrown in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\libs\class-oik-update.php on line 150
bobbingwide commented 3 years ago

Is this a duplicate of the problem reported here: https://github.com/bobbingwide/bobbingwide/issues/10#issuecomment-793818482

https://github.com/bobbingwide/bobbingwide/issues/10

bobbingwide commented 3 years ago

The problem can be resolved by checking that get_current_screen function exists. I've changed the shared library file in oik-bwtrace and now need to apply that to other plugins: oik-libs, oik and oik-lib

bobbingwide commented 3 years ago

Released in v3.2.2. Closing therefore