• Resolved Paulo Gomes

    (@pgomes2000)


    Hi,

    I’m with version 5.7.2 and I have the following error:
    Notice: 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 instaed. Please see Debugging in WordPress for more informatiom. (This message 5.7.0.) in /home/qh4dkxup/shoppingstore/shoppingstore/wp-includes/functions.php on line 5313

    The solution of the array i found on the forum:
    Line 221 wp-includes/functions.wp-scripts.php
    return $wp_scripts->localize( $handle, $object_name, (array)$l10n );

    give then another error:
    Parse error: syntax error, unexpected end of file in /home/qh4dkxup/shoppingstore/shoppingstore/wp-includes/functions.wp-scripts.php on line 419

    and then:

    (This message was added on version 3.1.0.) in /home/qh4dkxup/shoppingstore/shoppingstore/wp-includes/functions.php on line 5313

    I don’t know what to do.

    Any one can help me please. I can’t see woocommerce statistics, monsterhigh reports, etc..

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Did you just recently upgrade your WordPress site? What change did you make before you saw this error?

    Thread Starter Paulo Gomes

    (@pgomes2000)

    Hi @a2hostingrj

    I transfer manually the three sites I have to another hosting provider, but only on this I have the error.

    Hope you can have any ideia what is causing it.

    Thanks.

    I strongly suggest you to check the PHP version. Contact your hosting provider to get that info.

    Firstly, you should try disabling all plugins by renaming the plugins folder to plugins_old to find out which plugin is causing the error. If it still doesn’t fix the error, try changing your theme.

    Thread Starter Paulo Gomes

    (@pgomes2000)

    Hi,

    The problem was with the plgin Logien Rediret, it is not updated for a long time.

    Thanks for helping.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP error with the $l10n parameter must be an array’ is closed to new replies.