Skip to content

Commit 30987e7

Browse files
Coding Standards: Remove a one-time $sql variable in network_domain_check().
This allows the `$wpdb::prepare()` call to be picked up correctly by PHPCS. Follow-up to [28712]. Props aristath, poena, afercia, SergeyBiryukov. See #63168. git-svn-id: https://develop.svn.wordpress.org/trunk@60096 602fd350-edb4-49c9-b593-d223f7449a82
1 parent a9474dc commit 30987e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-admin/includes/network.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
function network_domain_check() {
2020
global $wpdb;
2121

22-
$sql = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $wpdb->site ) );
23-
if ( $wpdb->get_var( $sql ) ) {
22+
if ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $wpdb->site ) ) ) ) {
2423
return $wpdb->get_var( "SELECT domain FROM $wpdb->site ORDER BY id ASC LIMIT 1" );
2524
}
25+
2626
return false;
2727
}
2828

0 commit comments

Comments
 (0)