Background of the issue:
I am experiencing an issue with the WPML CMS Nav plugin on my website. Since updating to PHP 8.2, I have encountered deprecated property creation warnings in the plugin's code.
Symptoms:
The specific warnings are as follows:
[01-Aug-2024 00:34:34 UTC] PHP Deprecated: Creation of dynamic property wpml_cms_nav_cache::$name is deprecated in /home/www/madhouse.rs/wp-content/plugins/wpml-cms-nav/inc/cache.class.php on line 36
[01-Aug-2024 00:34:34 UTC] PHP Deprecated: Creation of dynamic property wpml_cms_nav_cache::$cache_to_option is deprecated in /home/www/madhouse.rs/wp-content/plugins/wpml-cms-nav/inc/cache.class.php on line 37
These warnings indicate that the creation of dynamic properties in the wpml_cms_nav_cache class is deprecated and should be addressed to ensure compatibility with PHP 8.2 and future versions.
Questions:
Could you please provide an update or patch to resolve this issue? I would greatly appreciate any assistance you can offer to help fix this problem without having to modify the plugin's code directly.
Thank you for your prompt attention to this matter.
Welcome to the WPML support forum. I will do my best to help you to resolve the issue.
We can reproduce this error here and it has been forwarded to our team. This will be fixed in the future version of WPML CMS Nav.
This alert won't affect the normal functioning of your site. As a temporary workaround, we recommend setting debug mode to false by adding or changing the following code in your wp-config.php file, located at the root of your WordPress installation:
define('WP_DEBUG', false);
This should help to resolve the issue until a permanent solution is implemented in future releases. Please try it after a site backup and let us know your feedback.
Hello,
To hide this error add :
#[\AllowDynamicProperties]
just before :
class wpml_cms_nav_cache{
in : wp-content\plugins\wpml-cms-nav\inc\cache.class.php
Manage Cookie Consent
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.