Changeset 62949
- Timestamp:
- 07/30/2026 07:18:52 PM (4 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-view-config-controller.php
r62668 r62949 194 194 195 195 if ( isset( $schema['oneOf'] ) || isset( $schema['anyOf'] ) ) { 196 $branches = isset( $schema['oneOf'] ) ? $schema['oneOf'] :$schema['anyOf'];196 $branches = $schema['oneOf'] ?? $schema['anyOf']; 197 197 if ( array() === $value ) { 198 198 foreach ( $branches as $branch ) { 199 if ( is_array( $branch ) && in_array( 'object', (array) ( isset( $branch['type'] ) ? $branch['type'] :array() ), true ) ) {199 if ( is_array( $branch ) && in_array( 'object', (array) ( $branch['type'] ?? array() ), true ) ) { 200 200 return (object) array(); 201 201 } … … 205 205 } 206 206 207 $types = (array) ( isset( $schema['type'] ) ? $schema['type'] :array() );207 $types = (array) ( $schema['type'] ?? array() ); 208 208 209 209 if ( in_array( 'array', $types, true ) && isset( $schema['items'] ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)