Classic SEO is not compatible with PHP 8

I wanted to test today, with full anticipation my website with ClassicPress 1.5. Unfortunately Classic SEO (latest version) is not compatible with PHP 8.

https://github.com/ClassicPress-plugins/classicpress-seo/issues/137

PHP 8.0.26
Classic Press Version 1.5.0
Classic Seo Version 2.0.1

While activating the Plugin i get this error on my dev instance.

Fatal error: Uncaught TypeError: filter_var(): Argument #3 ($options) must be of type array|int, string given in /home//www//wp-content/plugins/classicpress-seo/includes/helpers/class-param.php:56 Stack trace: #0 /home//www//wp-content/plugins/classicpress-seo/includes/helpers/class-param.php(56): filter_var('error_scrape', 516, '') #1 /home//www//wp-content/plugins/classicpress-seo/classicpress-seo.php(314): Classic_SEO\Helpers\Param::request('action') #2 /home//www//wp-content/plugins/classicpress-seo/classicpress-seo.php(188): Classic_SEO->init_actions() #3 /home//www//wp-content/plugins/classicpress-seo/classicpress-seo.php(164): Classic_SEO->setup() #4 /home//www//wp-content/plugins/classicpress-seo/classicpress-seo.php(440): Classic_SEO::get() #5 /home//www//wp-content/plugins/classicpress-seo/classicpress-seo.php(444): cpseo() #6 /home//www//wp-admin/includes/plugin.php(2138): include('/home//...') #7 /home//www//wp-admin/plugins.php(176): plugin_sandbox_scrape('classicpress-se...') #8 {main} thrown in /home//www/**/wp-content/plugins/classicpress-seo/includes/helpers/class-param.php on line 56

I think the plugin is very good, but I’m not sure if the plugin is still actively maintained. Do you have any information about it?

I was able to solve the problem as follows: In /wp-content/plugins/classicpress-seo/includes/helpers/class-param.php are four methods in which $filter = FILTER_DEFAULT, $flag = β€˜β€™ is defned. A 0 must be used, not an empty string.

After I made this change I could activate and deactivate the plugin and activate it again. All the previous tests worked. Do more tests. Hope that tomorrow I can use PHP 8 on the productive system.

Hallo,

the promised update would be fine. …

I like the plugin …

:grinning:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

We have a new version 2.1.0 coming out soon with PHP 8 compatibility. If you would like to test it, that would be very helpful before we release it.

You can download zip here.

Private repo I guess, it responds with 404. Would love to test.

I fixed the link. Repo is public, this release is still a draft, so it’s not public.

1 Like

Classic SEO v2.1.0 is out. You should be able to update now. If you have any issues, please start a new topic to report.

2 Likes