From 882dbf7b399fe3ddcd651f2227696cdfdb02f046 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 13 Nov 2025 21:57:31 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@61243 git-svn-id: http://core.svn.wordpress.org/trunk@60555 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wpdb.php | 8 +------- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/wp-includes/class-wpdb.php b/wp-includes/class-wpdb.php index 3fd9c928f3..68f1acfdf7 100644 --- a/wp-includes/class-wpdb.php +++ b/wp-includes/class-wpdb.php @@ -960,13 +960,7 @@ class wpdb { return; } - $modes_str = $modes_array[0]; - - if ( empty( $modes_str ) ) { - return; - } - - $modes = explode( ',', $modes_str ); + $modes = explode( ',', $modes_array[0] ); } $modes = array_change_key_case( $modes, CASE_UPPER ); diff --git a/wp-includes/version.php b/wp-includes/version.php index d25ea67e2e..81cb0efe57 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '7.0-alpha-61225'; +$wp_version = '7.0-alpha-61243'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.