Changeset 48507 for trunk/src/wp-includes/wp-db.php
- Timestamp:
- 07/18/2020 11:37:59 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/wp-db.php
r48200 r48507 968 968 $blog_id = $this->blogid; 969 969 } 970 970 971 $blog_id = (int) $blog_id; 971 if ( defined( 'MULTISITE' ) && ( 0 == $blog_id || 1 == $blog_id ) ) { 972 973 if ( defined( 'MULTISITE' ) && ( 0 === $blog_id || 1 === $blog_id ) ) { 972 974 return $this->base_prefix; 973 975 } else { … … 1315 1317 // If args were passed as an array (as in vsprintf), move them up. 1316 1318 $passed_as_array = false; 1317 if ( is_array( $args[0] ) && count( $args ) == 1 ) {1319 if ( is_array( $args[0] ) && count( $args ) === 1 ) { 1318 1320 $passed_as_array = true; 1319 1321 $args = $args[0]; … … 1940 1942 } 1941 1943 1942 if ( empty( $this->dbh ) || 2006 == $mysql_errno ) {1944 if ( empty( $this->dbh ) || 2006 === $mysql_errno ) { 1943 1945 if ( $this->check_connection() ) { 1944 1946 $this->_do_query( $query ); … … 2598 2600 } 2599 2601 2600 if ( OBJECT == $output ) {2602 if ( OBJECT === $output ) { 2601 2603 return $this->last_result[ $y ] ? $this->last_result[ $y ] : null; 2602 } elseif ( ARRAY_A == $output ) {2604 } elseif ( ARRAY_A === $output ) { 2603 2605 return $this->last_result[ $y ] ? get_object_vars( $this->last_result[ $y ] ) : null; 2604 } elseif ( ARRAY_N == $output ) {2606 } elseif ( ARRAY_N === $output ) { 2605 2607 return $this->last_result[ $y ] ? array_values( get_object_vars( $this->last_result[ $y ] ) ) : null; 2606 2608 } elseif ( OBJECT === strtoupper( $output ) ) { … … 2676 2678 2677 2679 $new_array = array(); 2678 if ( OBJECT == $output ) {2680 if ( OBJECT === $output ) { 2679 2681 // Return an integer-keyed array of row objects. 2680 2682 return $this->last_result; 2681 } elseif ( OBJECT_K == $output ) {2683 } elseif ( OBJECT_K === $output ) { 2682 2684 // Return an array of row objects with keys from column 1. 2683 2685 // (Duplicates are discarded.) … … 2692 2694 } 2693 2695 return $new_array; 2694 } elseif ( ARRAY_A == $output || ARRAY_N== $output ) {2696 } elseif ( ARRAY_A === $output || ARRAY_N === $output ) { 2695 2697 // Return an integer-keyed array of... 2696 2698 if ( $this->last_result ) { 2697 2699 foreach ( (array) $this->last_result as $row ) { 2698 if ( ARRAY_N == $output ) {2700 if ( ARRAY_N === $output ) { 2699 2701 // ...integer-keyed row arrays. 2700 2702 $new_array[] = array_values( get_object_vars( $row ) ); … … 3405 3407 3406 3408 if ( $this->col_info ) { 3407 if ( -1 == $col_offset ) {3409 if ( -1 === $col_offset ) { 3408 3410 $i = 0; 3409 3411 $new_array = array();
Note: See TracChangeset
for help on using the changeset viewer.