Fatal error: Uncaught Error: Call to undefined function wp_get_current_user()
-
Hi,
WordPress 6.2.2
When upgrading to Query Monitor 3.13.0, blank screen, impossible to access the website.
Here is the error in debug.log:
[14-Jul-2023 08:56:32 UTC] PHP Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /Applications/MAMP/htdocs/wordpressdev/wp-includes/capabilities.php:873 Stack trace: #0 /Applications/MAMP/htdocs/wordpressdev/wp-content/plugins/query-monitor/collectors/doing_it_wrong.php(73): current_user_can('view_query_moni...') #1 /Applications/MAMP/htdocs/wordpressdev/wp-includes/class-wp-hook.php(310): QM_Collector_Doing_It_Wrong->maybe_prevent_error(true) #2 /Applications/MAMP/htdocs/wordpressdev/wp-includes/plugin.php(205): WP_Hook->apply_filters(true, Array) #3 /Applications/MAMP/htdocs/wordpressdev/wp-includes/functions.php(5844): apply_filters('doing_it_wrong_...', true, 'register_uninst...', 'Only a static c...', '3.1.0') #4 /Applications/MAMP/htdocs/wordpressdev/wp-includes/plugin.php(924): _doing_it_wrong('register_uninst...', 'Only a static c...', '3.1.0') #5 /Applications/MAMP/htdocs/wordpressdev/wp-content/plugins/host-webfonts-local/src/Plugin.php(48): register_uninstall_hook('/Applications/M...', Array) #6 /Applications/MAMP/htdocs/wordpressdev/wp-content/plugins/host-webfonts-local/host-webfonts-local.php(37): OMGF\Plugin->__construct() #7 /Applications/MAMP/htdocs/wordpressdev/wp-settings.php(453): include_once('/Applications/M...') #8 /Applications/MAMP/htdocs/wordpressdev/wp-config.php(115): require_once('/Applications/M...') #9 /Applications/MAMP/htdocs/wordpressdev/wp-load.php(50): require_once('/Applications/M...') #10 /Applications/MAMP/htdocs/wordpressdev/wp-blog-header.php(13): require_once('/Applications/M...') #11 /Applications/MAMP/htdocs/wordpressdev/index.php(17): require('/Applications/M...') #12 {main} thrown in /Applications/MAMP/htdocs/wordpressdev/wp-includes/capabilities.php on line 873 [14-Jul-2023 08:56:32 UTC] PHP Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /Applications/MAMP/htdocs/wordpressdev/wp-includes/capabilities.php:873 Stack trace: #0 /Applications/MAMP/htdocs/wordpressdev/wp-content/plugins/query-monitor/collectors/doing_it_wrong.php(73): current_user_can('view_query_moni...') #1 /Applications/MAMP/htdocs/wordpressdev/wp-includes/class-wp-hook.php(310): QM_Collector_Doing_It_Wrong->maybe_prevent_error(true) #2 /Applications/MAMP/htdocs/wordpressdev/wp-includes/plugin.php(205): WP_Hook->apply_filters(true, Array) #3 /Applications/MAMP/htdocs/wordpressdev/wp-includes/functions.php(5844): apply_filters('doing_it_wrong_...', true, 'is_embed', 'Les balises de ...', '3.1.0') #4 /Applications/MAMP/htdocs/wordpressdev/wp-includes/query.php(882): _doing_it_wrong('is_embed', 'Les balises de ...', '3.1.0') #5 /Applications/MAMP/htdocs/wordpressdev/wp-includes/robots-template.php(93): is_embed() #6 /Applications/MAMP/htdocs/wordpressdev/wp-includes/class-wp-hook.php(308): wp_robots_noindex_embeds(Array) #7 /Applications/MAMP/htdocs/wordpressdev/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #8 /Applications/MAMP/htdocs/wordpressdev/wp-includes/robots-template.php(32): apply_filters('wp_robots', Array) #9 /Applications/MAMP/htdocs/wordpressdev/wp-includes/functions.php(3798): wp_robots() #10 /Applications/MAMP/htdocs/wordpressdev/wp-includes/functions.php(3722): _default_wp_die_handler('<div class="wp-...', 'WordPress \xC2\xBB Er...', Array) #11 /Applications/MAMP/htdocs/wordpressdev/wp-includes/class-wp-fatal-error-handler.php(239): wp_die(Object(WP_Error), '', Array) #12 /Applications/MAMP/htdocs/wordpressdev/wp-includes/class-wp-fatal-error-handler.php(154): WP_Fatal_Error_Handler->display_default_error_template(Array, Object(WP_Error)) #13 /Applications/MAMP/htdocs/wordpressdev/wp-includes/class-wp-fatal-error-handler.php(58): WP_Fatal_Error_Handler->display_error_template(Array, Object(WP_Error)) #14 [internal function]: WP_Fatal_Error_Handler->handle() #15 {main} thrown in /Applications/MAMP/htdocs/wordpressdev/wp-includes/capabilities.php on line 873
I removed the plugin manually, downgraded to version 3.12.3, no more issue.
Thank you.
Best regards,
Stf.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Fatal error: Uncaught Error: Call to undefined function wp_get_current_user()’ is closed to new replies.