From fbca20ce8f63726ca8da4014bae446655cd184c7 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sat, 23 Sep 2023 18:04:53 +0200 Subject: [PATCH] QA: remove redundant code The `explode()` function will always return an array, so strict comparing the return value with an empty string will never result in a passing condition. Ref: https://www.php.net/manual/en/function.explode.php --- admin-functions.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/admin-functions.php b/admin-functions.php index 28f169ac8..a375017dd 100644 --- a/admin-functions.php +++ b/admin-functions.php @@ -153,9 +153,6 @@ function duplicate_post_plugin_upgrade() { } $meta_blacklist = explode( ',', get_option( 'duplicate_post_blacklist' ) ); - if ( $meta_blacklist === '' ) { - $meta_blacklist = []; - } $meta_blacklist = array_map( 'trim', $meta_blacklist ); if ( in_array( '_wp_page_template', $meta_blacklist, true ) ) { update_option( 'duplicate_post_copytemplate', 0 );