This thread is resolved. Here is a description of the problem and solution.
Problem:
Client is getting following PHP error with WPML Sticky Links plugin, on PHP 8.x:
PHP Deprecated: Automatic conversion of false to array is deprecated in .../wp-content/plugins/wpml-sticky-links/classes/class-wpml-sticky-links.php on line 19.
If this does not resolve the issue or if the solution seems outdated or irrelevant 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.
<b>Background of the issue: </b>
[05-Aug-2024 10:38:07 UTC] PHP Deprecated: Automatic conversion of false to array is deprecated in /home/.../public_html/wp-content/plugins/wpml-sticky-links/classes/class-wpml-sticky-links.php on line 19[05-Aug-2024 10:38:07 UTC] PHP Deprecated: Automatic conversion of false to array is deprecated in /home/.../public_html/wp-content/plugins/wpml-sticky-links/classes/class-wpml-sticky-links.php on line 19
<b>Symptoms: </b>
<b>Questions: </b>
Please let me know whether it is possible to fix it to avoid having that warning.
However, may I ask you to try the following please?
IMPORTANT: Please take full backup of your website and database beforehand.
- Deactivate WPML Sticky Links plugin and delete it from plugins page.
- Download from https://wpml.org/account/downloads/ and upload via Plugins -> Add New -> Upload.
- Activate and recheck.
If this does not resolve the issue, please check the above mentioned errata for a workaround and try that. Although that should already be in place but just to confirm if you don't see it, you can try it to fix the issue temporarily.
Please let me know and I'll try my best to help you further on the matter.
But I am getting another deprecated thing linked to your plugin:
[05-Aug-2024 13:28:34 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/.../public_html/wp-includes/formatting.php on line 2819
A new version of WPML Sticky Links plugin is due release, although there's no ETA so far but we hope to have it out soon. Until then you can keep the fix in place to avoid that notice and once the new version is available, you can simply upgrade to that.
For the other deprecation notice, I checked and that's also part of several other deprecated notices due to PHP 8.x and new WordPress changes. These are also due in WPML 4.7 (no ETA so far but expected soon). So you can either check this thread https://wpml.org/forums/topic/deprecated-rtrim-passing-null-to-parameter-1-string-php-8-1-2/#post-13670953 for a temporary workaround, check our forums for another relevant solution, or, report in a separate ticket. Because as per forum policy we can only handle one issue per ticket/chat. So you can get more to the point help, without mixing up several issues in one long ticket.
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.