Open
Reported for: WPML Sticky Links 1.5.4
Overview of the issue
If you are using WPML Sticky Links plugin with PHP 8.x, you will find a deprecated error like the following:
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
Workaround
Please, make sure of having a full backup of your site before proceeding.
- Open …/wp-content/plugins/wpml-sticky-links/classes/class-wpml-sticky-links.php file.
- Look for line 19.
- Just before this line of code:
1
$this
->settings[
'sticky_links_widgets'
] = 0;
- Add the following:
123
if
(!
is_array
(
$this
->settings)){
$this
->settings =
array
();
}
When are you going to release an official update for this? I don’t want to code workarounds in official 3rd party plugins.
Many thanks, Daniel
Hello Daniel,
The issue is on our development queue, and we plan to release a new version with the fix soon.
When will this be fixed, it is still an issue.
The issue is on our development queue.
We will update this page once there is a new release.
Something similar here, with php 8.2
Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, bool given in /var/www/clients/client2/web26/web/wp-content/plugins/wpml-sticky-links/classes/custom-fields.php:169
Thank you for reporting this new issue. I’ve passed it to our devs.
23.02.2025, this this message
Deprecated: Automatic conversion of false to array is deprecated in …/class-wpml-sticky-links.php on line 19
Hi Maurizio,
Yes, that’s the same error. Please apply the workaround provided to resolve it. If you need any assistance, feel free to open a ticket on our support forum, and we’ll be happy to help.