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.