Home›Support›English Support›[Resolved] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current is deprecated
[Resolved] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current is deprecated
This thread is resolved. Here is a description of the problem and solution.
Problem: The client reported multiple PHP deprecation notices related to WPML after updating to PHP 8.2. These include deprecated property creation for WPML_LS_Menu_Item. Solution: We informed the client that these issues are already addressed in the upcoming WPML version 4.7, which is in the final QA stage. Meanwhile, we recommended a workaround involving a site backup and following the steps provided in a related support ticket: https://wpml.org/forums/topic/deprecated-errors-with-php-8-2/#post-15994511.
To prevent these warnings from displaying to site visitors, we advised disabling the debug mode in WordPress by adding
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, please open a new support ticket. 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.
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.
Hi Bigul, i did all the steps and the issue still exists.
Below the response of the WordPress debug.log:
[13-Aug-2024 19:36:38 UTC] PHP Deprecated: File class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailerPHPMailer namespace. in /data/sites/web/gvrrocks/www/wp-includes/functions.php on line 6085
[13-Aug-2024 19:36:38 UTC] PHP Deprecated: File class-smtp.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/SMTP.php instead. The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailerPHPMailer namespace. in /data/sites/web/gvrrocks/www/wp-includes/functions.php on line 6085
[13-Aug-2024 19:36:39 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current is deprecated in /data/sites/web/gvrrocks/www/wp-includes/nav-menu-template.php on line 394
[13-Aug-2024 19:36:39 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current_item_ancestor is deprecated in /data/sites/web/gvrrocks/www/wp-includes/nav-menu-template.php on line 540
[13-Aug-2024 19:36:39 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current_item_parent is deprecated in /data/sites/web/gvrrocks/www/wp-includes/nav-menu-template.php on line 541
[13-Aug-2024 19:36:39 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current is deprecated in /data/sites/web/gvrrocks/www/wp-includes/nav-menu-template.php on line 394
[13-Aug-2024 19:36:39 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current_item_ancestor is deprecated in /data/sites/web/gvrrocks/www/wp-includes/nav-menu-template.php on line 540
[13-Aug-2024 19:36:39 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current_item_parent is deprecated in /data/sites/web/gvrrocks/www/wp-includes/nav-menu-template.php on line 541
[13-Aug-2024 19:36:39 UTC] PHP Deprecated: Bestand class-phpmailer.php is sinds versie 5.5.0 verouderd! Gebruik in plaats daarvan wp-includes/PHPMailer/PHPMailer.php. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailerPHPMailer namespace. in /data/sites/web/gvrrocks/www/wp-includes/functions.php on line 6085
[13-Aug-2024 19:36:39 UTC] PHP Deprecated: Bestand class-smtp.php is sinds versie 5.5.0 verouderd! Gebruik in plaats daarvan wp-includes/PHPMailer/SMTP.php. The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailerPHPMailer namespace. in /data/sites/web/gvrrocks/www/wp-includes/functions.php on line 6085
[13-Aug-2024 19:36:39 UTC] PHP Deprecated: Bestand class-phpmailer.php is sinds versie 5.5.0 verouderd! Gebruik in plaats daarvan wp-includes/PHPMailer/PHPMailer.php. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailerPHPMailer namespace. in /data/sites/web/gvrrocks/www/wp-includes/functions.php on line 6085
[13-Aug-2024 19:36:39 UTC] PHP Deprecated: Bestand class-smtp.php is sinds versie 5.5.0 verouderd! Gebruik in plaats daarvan wp-includes/PHPMailer/SMTP.php. The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailerPHPMailer namespace. in /data/sites/web/gvrrocks/www/wp-includes/functions.php on line 6085
Welcome to the WPML support forum. I will do my best to help you to resolve the issue.
The following notices are already fixed in the upcoming version of WPML(4.7). It is currently in the final QA stage.
[13-Aug-2024 19:36:39 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current is deprecated in /data/sites/web/gvrrocks/www/wp-includes/nav-menu-template.php on line 394
[13-Aug-2024 19:36:39 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current_item_ancestor is deprecated in /data/sites/web/gvrrocks/www/wp-includes/nav-menu-template.php on line 540
So please try the workaround suggested in the following ticket after a site backup for the time being.
Thank you for the feedback. Yes, it happens with a conclift with PHP 8.2.* versions. But it will not cause any issues in the functionality of the plugin, just an alert. So kindly wait for the WPML 4.7 release. We will update you once it is ready.
Therefore to prevent unwanted warnings and errors from being displayed to your visitors, it's best to disable debug mode in WordPress. This is a recommended practice to ensure a smoother user experience. To do so, edit your wp-config.php file and add or modify the following line:
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.