[wp-trac] [WordPress Trac] #29722: wp_localize_script should be able to manage scalars
WordPress Trac
noreply at wordpress.org
Wed Sep 23 02:05:56 UTC 2015
#29722: wp_localize_script should be able to manage scalars
------------------------------------------------+--------------------------
Reporter: Fab1en | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: I18N | Review
Severity: normal | Version: 3.3
Keywords: has-patch dev-feedback 2nd-opinion | Resolution:
| Focuses: javascript
------------------------------------------------+--------------------------
Changes (by jtsternberg):
* keywords: => has-patch dev-feedback 2nd-opinion
* type: enhancement => defect (bug)
Comment:
Big +1 here. Scalars should work (they actually do, but not w/o warnings).
I've attached a patch (29722.3.diff) which allows scalars, and adds a
supporting unit test. Changing this to a defect/bug because it's actually
a bug in the way it's written (looping through `$l10n` by casting `$l10n`
to an array but not checking if it's an array before stuffing an array
key/value).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29722#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list