[wp-trac] [WordPress Trac] #30613: Check the return value of wp_json_encode()
WordPress Trac
noreply at wordpress.org
Sat Dec 6 10:11:29 UTC 2014
#30613: Check the return value of wp_json_encode()
--------------------------+-----------------------------
Reporter: pento | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript
--------------------------+-----------------------------
Changes (by pento):
* keywords: => has-patch
Comment:
[attachment:30613.diff] is a first pass at this. For the most part, it
just swaps `false` for an empty array, object or string, but I think we
could add extra sanity checking on the JS side.
For example, the change in `wp-admin/includes/template.php` swaps `false`
for `"false"`, then the JS sanity checks the value before continuing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30613#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list