WordPress.org

Make WordPress Core

Ticket #48785: #48785-improve.patch

File #48785-improve.patch, 534 bytes (added by dhavalkasvala, 8 months ago)
  • class-wp-rest-controller.php

     
    292292
    293293                $schema = $this->get_item_schema();
    294294
    295                 foreach ( $schema['properties'] as &$property ) {
    296                         unset( $property['arg_options'] );
     295                if ( ! empty( $schema['properties'] ) ) {
     296                        foreach ( $schema['properties'] as &$property ) {
     297                                unset( $property['arg_options'] );
     298                        }
    297299                }
    298300
    299301                return $schema;