Skip to content

Commit

Permalink
Merge pull request #225 from humanmade/fix-223
Browse files Browse the repository at this point in the history
223: Fix a warning when filtering attachment metadata
  • Loading branch information
svandragt authored Jun 11, 2024
2 parents 239578e + 181ec67 commit b138382
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inc/cropper/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,10 @@ function filter_attachment_meta_data( $data, $attachment_id ) {
return $data;
}

if ( empty( $data['file'] ) {
return $data;
}

if ( skip_attachment( $attachment_id ) ) {
return $data;
}
Expand Down

0 comments on commit b138382

Please sign in to comment.