Skip to content

Commit

Permalink
Split conditionals into separate statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mitogh committed Mar 30, 2022
1 parent 7a113d3 commit e202548
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/images/webp-uploads/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,11 @@ function webp_uploads_get_next_full_size_key_from_backup( $attachment_id ) {
function webp_uploads_restore_image( $attachment_id, $data ) {
$backup_sources = get_post_meta( $attachment_id, '_wp_attachment_backup_sources', true );

if ( ! is_array( $backup_sources ) || ! isset( $backup_sources['full-orig'] ) || ! is_array( $backup_sources['full-orig'] ) ) {
if ( ! is_array( $backup_sources ) ) {
return $data;
}

if ( ! isset( $backup_sources['full-orig'] ) || ! is_array( $backup_sources['full-orig'] ) ) {
return $data;
}

Expand Down

0 comments on commit e202548

Please sign in to comment.