[wp-trac] [WordPress Trac] #48528: warning in wp-includes/class.wp-scripts.php:454: Cannot assign an empty string to a string offset

WordPress Trac noreply at wordpress.org
Sat Nov 9 09:05:15 UTC 2019


#48528: warning in wp-includes/class.wp-scripts.php:454: Cannot assign an empty
string to a string offset
---------------------------+------------------------------
 Reporter:  dpacks         |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:  5.2.4
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by nofearinc):

 The `wp_localize_script` docs treat $l10n as an array, which is why an
 empty string is not a valid default value. I'm not sure what's the use
 case for an empty value in general, but have you tested an empty array
 instead?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48528#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list