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

WordPress Trac noreply at wordpress.org
Mon Feb 14 11:25:27 UTC 2022


#55161: Full Site Editing: PHP Warning with incomplete presets
-------------------------------------+-----------------------------
 Reporter:  jeherve                  |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  5.9.1
Component:  Editor                   |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  administration
-------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * milestone:  Future Release => 5.9.1


Comment:

 Replying to [comment:1 swissspidy]:
 > you can just combine the `isset()` calls like so:
 >
 > `isset( $preset_metadata['value_key'], $preset[
 $preset_metadata['value_key'] ] )`

 Technically true, but that doesn't seem to be a common pattern in core, we
 seem to generally check multiple values separately.
 [attachment:"55161.diff"] looks a bit more readable to me as is :)

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


More information about the wp-trac mailing list