-
danieldau
Hi,
Our website host tried updating the php version and when they did they got a fatal error and said generatepress was not compatible with any php 8 version. They asked us to inform you of the following error:
Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method next_article_layout_class_grid::next_print_script_in_header() cannot be called statically in /home/nginx/domains/WEBSITENAME.com/public/wp-includes/class-wp-hook.php:324 Stack trace: #0 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #1 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/plugin.php(517): WP_Hook->do_action() #2 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/general-template.php(3064): do_action() #3 /home/nginx/domains/WEBSITENAME.com/public/wp-content/themes/generatepress/header.php(16): wp_head() #4 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/template.php(810): require_once(‘…’) #5 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/template.php(745): load_template() #6 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/general-template.php(48): locate_template() #7 /home/nginx/domains/WEBSITENAME.com/public/wp-content/themes/generatepress/page.php(17): get_header() #8 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/template-loader.php(106): include(‘…’) #9 /home/nginx/domains/WEBSITENAME.com/public/wp-blog-header.php(19): require_once(‘…’) #10 /home/nginx/domains/WEBSITENAME.com/public/index.php(17): require(‘…’) #11 {main} thrown in /home/nginx/domains/WEBSITENAME.com/public/wp-includes/class-wp-hook.php on line 324
-
Hi there,
GP is certainly compatible with PHP 8, my sites are using PHP 8.2.10 without any issue.
The error log looks like it is mostly related to the plugins adding functions to the WordPress hook, and PHP 8 is stricter about how functions are called.
And the mentioned functions in the error logs are not from GP.
Can you try disabling all plugins before updating to PHP 8?
-
danieldau
Thanks for your response. It was indeed an old plugin.
-
You are welcome 🙂
- You must be logged in to reply to this topic.