Skip to content

Commit 259bea5

Browse files
committed
fix: define $schema in WP_REST_Attachments_Controller::update_item()
1 parent dd2d7ef commit 259bea5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ public function update_item( $request ) {
458458
}
459459

460460
$attachment = get_post( $request['id'] );
461+
$schema = $this->get_item_schema();
461462

462463
if ( ! empty( $schema['properties']['featured_media'] ) && isset( $request['featured_media'] ) ) {
463464
$thumbnail_update = $this->handle_featured_media( $request['featured_media'], $attachment->ID );

0 commit comments

Comments
 (0)