[wp-trac] [WordPress Trac] #55161: Full Site Editing: PHP Warning with incomplete presets
WordPress Trac
noreply at wordpress.org
Thu Feb 17 18:45:50 UTC 2022
#55161: Full Site Editing: PHP Warning with incomplete presets
------------------------------+-----------------------------
Reporter: jeherve | Owner: hellofromTonya
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.9.1
Component: Editor | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses: administration
------------------------------+-----------------------------
Changes (by hellofromTonya):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"52763" 52763]:
{{{
#!CommitTicketReference repository="" revision="52763"
Editor: Adds an additional check to guard against incompete presets.
Adds an additional guard to ensure the value of
`$preset_metadata['value_key']` actually exists as a key in the `$preset`
array. Fixes `Warning: Undefined array key` error.
Intentionally adds the check into the existing `isset()` as it's native to
PHP, more efficient, and a good pattern.
Follow-up [52049].
Props jeherve, swissspidy, sergeybiryukov, jrf.
Fixes #55161.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55161#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list