[wp-trac] [WordPress Trac] #44832: Lack of null check in wp-embed.js causes uncaught error to be thrown under certain circumstances.
WordPress Trac
noreply at wordpress.org
Thu Aug 23 15:32:43 UTC 2018
#44832: Lack of null check in wp-embed.js causes uncaught error to be thrown under
certain circumstances.
----------------------------------------+-----------------------------
Reporter: dsifford | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Embeds | Version: 4.4
Severity: minor | Resolution:
Keywords: needs-patch good-first-bug | Focuses: javascript
----------------------------------------+-----------------------------
Changes (by swissspidy):
* keywords: => needs-patch good-first-bug
* version: trunk => 4.4
* severity: normal => minor
* milestone: Awaiting Review => Future Release
Comment:
Good catch! Although your proposed change wouldn't actually return early
when `data` is null.
It would be more something like
{{{
if ( ! data || ! ( data.secret || data.message || data.value ) ) {
return;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44832#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list