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
This issue is fixed. Updating to the latest version solves it on your site, so you only need this workaround if you can’t update yet.
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:
$this->settings['sticky_links_widgets'] = 0;
- Add the following:
if (!is_array($this->settings)){ $this->settings = array(); }