Skip to content

Commit

Permalink
QA: remove redundant code
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jrfnl committed Nov 20, 2023
1 parent 5ba6590 commit fbca20c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions admin-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit fbca20c

Please sign in to comment.