• Resolved celinech

    (@celinech)


    Hi, I’ve just create a staging version of my website and in the front side, I have the following message :

    Notice: The function WP_Scripts::localize was called incorrectly. The parameter $l10n must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead.
    More information: Debugging in WordPress. (This message was added in version 5.7.0.) in /home/customer/www/XXX/public_html/XXX_stagi/wp-includes/functions.php on line 6085.

    What can I do to solve the problem? Thanks

    • This topic was modified 3 weeks, 4 days ago by celinech.
Viewing 1 replies (of 1 total)
  • Plugin Contributor alaasalama

    (@alaasalama)

    Hi @celinech
    This is just a WordPress related notice (not an error) and you can hide it on the staging site by editing this file (on the staging site’s directory) “/wp-config.php” and add this line:

    define( 'WP_DEBUG', false );

    If that doesn’t work, please add these lines instead:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );


    P.S. If these lines already there, make sure to adjust their values according to what I wrote above, and don’t create duplicates of these lines.

    Let me know how it goes,
    Thanks,
    Alaa

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.