Error message since upgrading PHP version

Hi

Since upgrading to PHP 8.1 I get this error message across the top of my WP dashboard. I can’t quite capture the whole message though:

E_DEPRECATED: Return type of Themeco\Cornerstone\Parsy\Token::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/broughto/public_html/wp-content/plugins/cornerstone/includes/classes/Parsy/Token.php on line 33.

It doesn’t appear to visitors to the site and the site seems to be working ok.

This is the site in question: https://www.broughtonschoolofmotoring.com/

Can anyone confirm that it’s not important and tell me how to get rid of it?

Hey @stevetheadi,

In some servers, Cornerstone has issues with PHP 8 new features. If there’s no major issues on your end just like you mentioned that it doesn’t affect your visitors, try hiding the errors using WordPress’ debug setup to hide errors here: https://wordpress.org/support/article/debugging-in-wordpress/

If that doesn’t work for you, you need to downgrade PHP to version 7.4

Thanks.

Hi.

Many thanks for your advice. I’ve tried hiding the errors on the dashboard by editing the wp-config file as shown but the message remains.

I’m not really concerned about that and I think the advantages of using the latest version of PHP outweigh the slight annoyance when I see the error message. So I’ll probably leave things as they are.

Thanks again.

You are most welcome.

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