• Hi,

    since yesterday i keep getting the following error which keeps repeating itself in the debug.log.

    PHP Notice: Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.) in …/wp-includes/functions.php on line 5835.

    My entire programming environment is up to date.

    How can be solved?

    Thank you in advance for your kind support.
    Best Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can try by switching to default wordpress theme like 2022 and check if it resolves the issue or temporarily disable all plugins and check if error resolved

    Thread Starter t5mlfgk116pmoq

    (@t5mlfgk116pmoq)

    Hi Swayam,

    Thank you for your answer.

    It would be useful to precisely identify the nature of this problem, why it occurs, what consequences it leads to and how to solve it at the root/base avoiding (or trying to avoid) its recurrence. At the moment I can’t change the theme and I can’t deactivate the plugins. In light of the above, what information exactly do you have regarding this error?

    Thank you for your support.
    Best Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Function WP_Scripts::localize was called incorrectly’ is closed to new replies.