Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
After upgrading to PHP 8.3.x, you are encountering a PHP Deprecation notice on Toolset Types 3.5.2. The notice indicates that the return type of OTGSToolsetCommonUtilsRecursiveDotFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice.
Solution:
We recommend disabling the debug mode in WordPress to prevent these warnings from being displayed to your visitors. This can be achieved by editing your wp-config.php file and ensuring it includes the following line:

define('WP_DEBUG_DISPLAY', false);

For more information on handling deprecated errors in PHP 8.2 and up, please visit our errata page: https://wpml.org/errata/php-8-2-deprecated-creation-of-dynamic-property-whip_requirementscheckerconfiguration-is-deprecated/
Additionally, you can refer to the official WordPress.org website for a general explanation on handling deprecation notices: https://make.wordpress.org/core/2022/01/10/wordpress-5-9-and-php-8-0-8-1/

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If needed, please open a new support ticket at WPML support forum for further assistance.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Mihai Apetrei 5 months ago.

Assisted by: Mihai Apetrei.

Author Posts
June 19, 2024 at 9:27 am #15754434

Marco

Background of the issue:
I am trying to: After upgrading to PHP 8.3.x there's this PHP Deprecation notice on Toolset Types 3.5.2_ Return type of OTGSToolsetCommonUtilsRecursiveDotFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Symptoms:
PHP Deprecated notice on Toolset Types after upgrading to PHP 8.3.x

Questions:
How can I resolve the PHP Deprecation notice on Toolset Types after upgrading to PHP 8.3.x?
Is there a compatibility issue with Toolset Types 3.5.2 and PHP 8.3.x?

June 19, 2024 at 1:49 pm #15756137

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there,

Thank you for contacting WPML support.

PHP v8.2.x and up are relatively new versions and not yet fully compatible with WPML.

However, I noticed that the error you're encountering is just a warning about deprecated functions that will require modification soon.

Nevertheless, these functions are still operational.

To avoid showing your visitors unwanted warnings and errors, it's best to disable the debug mode in WordPress. This is actually a recommended practice, so you won't have to worry.

To achieve that, edit your wp-config.php file and make sure it has this line

define( 'WP_DEBUG_DISPLAY', false );

Also, please take a look here in regards to deprecated errors in general showing up from PHP 8.2 and up:
https://wpml.org/errata/php-8-2-deprecated-creation-of-dynamic-property-whip_requirementscheckerconfiguration-is-deprecated/

I hope that you will find all this information helpful.

Mihai Apetrei

June 22, 2024 at 12:26 am #15779835

Marco

Still not fixed. The WP_DEBUG thing is not a solution. Fixing the bug is.

June 22, 2024 at 7:45 pm #15787326

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there. I understand your concern.

Deprecation notices are not errors/bugs.

Please take a look at the explanation from the official WordPress.org website (I will also assign a screenshot):
https://make.wordpress.org/core/2022/01/10/wordpress-5-9-and-php-8-0-8-1/

These notices will go away in future updates but for now, if you want to hide them from visitors, you can set that value to "false".

I hope that you will find this information helpful.

Screenshot 2024-06-22 at 22.36.30.png