Skip to content

Commit 5474fcd

Browse files
Update src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
Co-authored-by: Christoph Daum <c.daum@me.com>
1 parent 2cb2454 commit 5474fcd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2151,7 +2151,7 @@ public function sideload_item( WP_REST_Request $request ) {
21512151
$size = wp_getimagesize( $path );
21522152

21532153
// Validate dimensions match expected size.
2154-
if ( $size ) {
2154+
if ( is_array( $size ) ) {
21552155
$validation = $this->validate_image_dimensions( $size[0], $size[1], $image_size, $attachment_id );
21562156
if ( is_wp_error( $validation ) ) {
21572157
// Clean up the uploaded file.

0 commit comments

Comments
 (0)