Changes between Initial Version and Version 1 of Ticket #51461, comment 11
- Timestamp:
- 10/15/2020 03:09:46 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #51461, comment 11
initial v1 6 6 }}} 7 7 8 In a PHP7+ world, `wp_array_get( $block->supports, 'field', false )` could be replaced with `$block->supports['field'] ?? false` 8 In a PHP7+ world, `wp_array_get( $block->supports, 'field', false )` could be replaced with `$block->supports['field'] ?? false` (which seems far easier to read than this function, same as the isset() is easier to understand) 9 9 10 10 There's also an edge oddity around null values (that while not used in core, might present in others usage of it) such that `wp_array_get( [ 'key' => null ], 'key', true )` returns `true` as the key isn't considered set in the input. Perhaps that would be thought of as expected behaviour.