Skip to content

Commit 706307a

Browse files
Coding Standards: Remove redundant check in wpdb::set_sql_mode().
This commit removes an unnecessary `empty( $modes_str )` check, as the previous code block already checks the same value and returns early. Follow-up to [30587], [56475]. Props justlevine. See #64238. git-svn-id: https://develop.svn.wordpress.org/trunk@61243 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 2740a8e commit 706307a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/wp-includes/class-wpdb.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -960,13 +960,7 @@ public function set_sql_mode( $modes = array() ) {
960960
return;
961961
}
962962

963-
$modes_str = $modes_array[0];
964-
965-
if ( empty( $modes_str ) ) {
966-
return;
967-
}
968-
969-
$modes = explode( ',', $modes_str );
963+
$modes = explode( ',', $modes_array[0] );
970964
}
971965

972966
$modes = array_change_key_case( $modes, CASE_UPPER );

0 commit comments

Comments
 (0)