• Resolved George

    (@subscriptiongroup)


    Ever since your last update, we are receiving a large number of PHP notices as follows

    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.)

    Stack trace:

    wp-includes/functions.php:5535
    WP_Scripts->localize()
    wp-includes/functions.wp-scripts.php:221
    wp_localize_script()
    wp-content/plugins/popup-builder/com/helpers/ScriptsIncluder.php:134
    sgpb\ScriptsIncluder::localizeScript()
    wp-content/plugins/popup-builder/com/classes/ScriptsLoader.php:264
    sgpb\ScriptsLoader->includeScripts()
    wp-content/plugins/popup-builder/com/classes/ScriptsLoader.php:138
    sgpb\ScriptsLoader->loadToFooter()
    wp-content/plugins/popup-builder/com/classes/PopupLoader.php:156
    sgpb\PopupLoader->loadPopups()
    wp-content/plugins/popup-builder/com/classes/Actions.php:852
    sgpb\Actions->enqueuePopupBuilderScripts()
    wp-includes/class-wp-hook.php:303
    do_action('wp_enqueue_scripts')
    wp-includes/script-loader.php:2083
    wp_enqueue_scripts()
    wp-includes/class-wp-hook.php:303
    do_action('wp_head')
    wp-includes/general-template.php:3015
    wp_head()

    As the message indicates, you are using wp_localize_script to pass data to javascript, but instead, you should be using wp_add_inline_script

    Those notices flood our logs, making it especially hard to identify actual issues.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Dear @subscriptiongroup ,

    Thanks a lot for reporting.
    We are sincerely sorry for the inconvenience.
    The issue will be solved during the next update.
    Once it is done, we will get back to you.

    Best,
    Popup Builder Team

    Dear @subscriptiongroup ,

    As promised, we are back with exciting news.
    This is to inform you, that the issue is solved with the latest 4.0.2 update of the plugin.
    Just make sure you have the version and the cache is cleared.

    Please, get back to us, if you need further assistance.

    Best,
    Popup Builder Team

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP notice’ is closed to new replies.