- Status
- Resolved
- Resolved in
- 3.1.8
Overview of the issue
- Full error notice: Notice: WP_Scripts::localize was called <strong>incorrectly</strong>. The <code>$l10n</code> parameter must be an array.
- We have a new notice appearing with WordPress version 5.7
- You will see this error ONLY if you have wp_debug enabled.
We are aware of this issue, we have a fix already, and we will release a version that will include the right fix after we finish testing it soon.
Workaround
A fix will be released soon for this issue.
Here’s a patch to prevent the notice:
Edit the file wp-content/plugins/wpml-string-translation/classes/menus/theme-plugin-localization-ui/class-wpml-st-theme-plugin-localization-resources.php on line 27 and replace:
get_option( WPML_ST_Themes_And_Plugins_Updates::WPML_ST_ITEMS_TO_SCAN )
By:
get_option( WPML_ST_Themes_And_Plugins_Updates::WPML_ST_ITEMS_TO_SCAN, [] )