Hi @seanlance,
Due to the location where this is being triggered from, I believe this is being triggered by a plugin passing invalid parameters to wp_localize_script().
It appears that a plugin is calling it like.. wp_localize_script( 'handle', 'jsObject', 'String here that should be an array' );
What plugins are you running? Can you do any debugging to find out what the $handle parameter is set to when the warning is triggered?
That’s from the wp-optimize plugin. I am Sorry!!
-
This reply was modified 5 years, 3 months ago by
Skrlance.
Hello, I have the exact same problem, in a personal script when calling wp_localize.Wordpress 5.6, PHP 8.0
Do you have an idea for a solution?
Thank you for your attention.
wp_localize_script( ‘asaScripts’, ‘ajaxurl’, admin_url( ‘admin-ajax.php’ ) );`
Images:
Error message
Function
For me, the Warning disappeal after update WP to 5.7.
Yes, WordPress 5.7 adds more PHP 8 compatibility fixes.
Currently, we still recommend PHP 7.4.
Perfect for me.
My site run under php8! 🙂