WordPress.org

Make WordPress Core

Ticket #48785: #48785.patch

File #48785.patch, 530 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;