- This topic has 6 replies, 3 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
November 14, 2022 at 7:20 am #2414855
Michael
Hi there
As of today, are GeneratePress and GP Premium fully compatible with PHP 8.1 or what is the current status?
Thanks a lot
MichaelNovember 14, 2022 at 7:57 am #2415115David
StaffCustomer SupportHi there,
Hard to put a figure on it but i would say 99.99%.
Reason i say that, is our compatibility is based on coding to WP Standards. So when WP works fine with PHP 8.1 so should GP.
But WP 6.1 introduced a lot of changes, which included some code deprecations as well as some oversights in what output we expect from their code.For example – see here:
https://generatepress.com/forums/topic/deprecated-code-for-php-8-1/#post-2412066
We have had a couple of users report server log warnings ( not errors and no critical errors ) – and in most of these cases it is where a WP function isn’t returning whats expected. So that results in us having to do a little patchwork.
For me personally, i have been running 8.1 on several sites.
And the only ones i haven’t switched are due to plugins that just are not compatible.November 17, 2022 at 12:47 am #2419127Joel Burghardt
Hi there, I get a Fatal Error with PHP 8.1 and GP Pro when entering in Backend to the Elements Tab.
[16-Nov-2022 17:07:40 UTC] PHP Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in /wp-content/themes/generatepress/inc/structure/post-meta.php:520 Stack trace: #0 /wp-content/themes/generatepress/inc/structure/post-meta.php(520): in_array(false, false) #1 /wp-includes/class-wp-hook.php(308): generate_add_post_meta(Object(WP)) #2 /wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) #3 /wp-includes/plugin.php(565): WP_Hook->do_action(Array) #4 /wp-includes/class-wp.php(797): do_action_ref_array('wp', Array) #5 /wp-includes/functions.php(1332): WP->main(Array) #6 /wp-admin/includes/post.php(1245): wp(Array) #7 /wp-admin/includes/class-wp-posts-list-table.php(165): wp_edit_posts_query() #8 /wp-admin/edit.php(235): WP_Posts_List_Table->prepare_items() #9 {main} thrown in /wp-content/themes/generatepress/inc/structure/post-meta.php on line 520 [16-Nov-2022 17:07:40 UTC] PHP Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in /wp-content/themes/generatepress/inc/structure/post-meta.php:520 Stack trace: #0 /wp-content/themes/generatepress/inc/structure/post-meta.php(520): in_array('post', false) #1 /wp-includes/class-wp-hook.php(308): generate_add_post_meta(Object(WP)) #2 /wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #3 /wp-includes/plugin.php(565): WP_Hook->do_action(Array) #4 /wp-includes/class-wp.php(797): do_action_ref_array('wp', Array) #5 /wp-includes/functions.php(1332): WP->main('') #6 /wp-blog-header.php(16): wp() #7 /index.php(17): require('/www/htdocs/s01...') #8 {main} thrown in /wp-content/themes/generatepress/inc/structure/post-meta.php on line 520November 17, 2022 at 4:47 am #2419413David
StaffCustomer SupportHi there,
do you have any Elements saved in your Appearance > Elements ?
November 21, 2022 at 8:30 am #2425721Michael
Thanks David – waiting for GravityForms and Yoast SEO to be compatible as well.
November 21, 2022 at 8:31 am #2425723Joel Burghardt
Thanks David, its now working.
November 21, 2022 at 8:44 am #2425748David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.