From e202548ef2aef815e8bd09f21fa4f9a1db94ee2c Mon Sep 17 00:00:00 2001 From: Crisoforo Gaspar Date: Wed, 30 Mar 2022 12:11:38 -0600 Subject: [PATCH] Split conditionals into separate statements --- modules/images/webp-uploads/load.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/images/webp-uploads/load.php b/modules/images/webp-uploads/load.php index 735297aedd..a129637ac3 100644 --- a/modules/images/webp-uploads/load.php +++ b/modules/images/webp-uploads/load.php @@ -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; }