[wp-trac] [WordPress Trac] #55161: Full Site Editing: PHP Warning with incomplete presets

WordPress Trac noreply at wordpress.org
Thu Feb 17 18:54:52 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 dev-reviewed        |     Focuses:
  fixed-major                                    |  administration
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"52764" 52764]:
 {{{
 #!CommitTicketReference repository="" revision="52764"
 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.
 Merges [52763] to the 5.9 branch.
 Fixes #55161.
 }}}

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


More information about the wp-trac mailing list