Ticket #49453: 49453.patch
File 49453.patch, 2.7 KB (added by , 5 years ago) |
---|
-
wp-db.php
967 967 $blog_id = $this->blogid; 968 968 } 969 969 $blog_id = (int) $blog_id; 970 if ( defined( 'MULTISITE' ) && ( 0 == $blog_id || 1== $blog_id ) ) {970 if ( defined( 'MULTISITE' ) && ( 0 === $blog_id || 1 === $blog_id ) ) { 971 971 return $this->base_prefix; 972 972 } else { 973 973 return $this->base_prefix . $blog_id . '_'; … … 1307 1307 1308 1308 // If args were passed as an array (as in vsprintf), move them up. 1309 1309 $passed_as_array = false; 1310 if ( is_array( $args[0] ) && count( $args ) == 1 ) {1310 if ( is_array( $args[0] ) && count( $args ) === 1 ) { 1311 1311 $passed_as_array = true; 1312 1312 $args = $args[0]; 1313 1313 } … … 1931 1931 } 1932 1932 } 1933 1933 1934 if ( empty( $this->dbh ) || 2006 == $mysql_errno ) {1934 if ( empty( $this->dbh ) || 2006 === $mysql_errno ) { 1935 1935 if ( $this->check_connection() ) { 1936 1936 $this->_do_query( $query ); 1937 1937 } else { … … 2569 2569 return null; 2570 2570 } 2571 2571 2572 if ( OBJECT == $output ) {2572 if ( OBJECT === $output ) { 2573 2573 return $this->last_result[ $y ] ? $this->last_result[ $y ] : null; 2574 } elseif ( ARRAY_A == $output ) {2574 } elseif ( ARRAY_A === $output ) { 2575 2575 return $this->last_result[ $y ] ? get_object_vars( $this->last_result[ $y ] ) : null; 2576 } elseif ( ARRAY_N == $output ) {2576 } elseif ( ARRAY_N === $output ) { 2577 2577 return $this->last_result[ $y ] ? array_values( get_object_vars( $this->last_result[ $y ] ) ) : null; 2578 2578 } elseif ( OBJECT === strtoupper( $output ) ) { 2579 2579 // Back compat for OBJECT being previously case-insensitive. … … 2644 2644 } 2645 2645 2646 2646 $new_array = array(); 2647 if ( OBJECT == $output ) {2647 if ( OBJECT === $output ) { 2648 2648 // Return an integer-keyed array of row objects. 2649 2649 return $this->last_result; 2650 } elseif ( OBJECT_K == $output ) {2650 } elseif ( OBJECT_K === $output ) { 2651 2651 // Return an array of row objects with keys from column 1. 2652 2652 // (Duplicates are discarded.) 2653 2653 if ( $this->last_result ) { … … 2660 2660 } 2661 2661 } 2662 2662 return $new_array; 2663 } elseif ( ARRAY_A == $output || ARRAY_N== $output ) {2663 } elseif ( ARRAY_A === $output || ARRAY_N === $output ) { 2664 2664 // Return an integer-keyed array of... 2665 2665 if ( $this->last_result ) { 2666 2666 foreach ( (array) $this->last_result as $row ) { 2667 if ( ARRAY_N == $output ) {2667 if ( ARRAY_N === $output ) { 2668 2668 // ...integer-keyed row arrays. 2669 2669 $new_array[] = array_values( get_object_vars( $row ) ); 2670 2670 } else { … … 3373 3373 $this->load_col_info(); 3374 3374 3375 3375 if ( $this->col_info ) { 3376 if ( -1 == $col_offset ) {3376 if ( -1 === $col_offset ) { 3377 3377 $i = 0; 3378 3378 $new_array = array(); 3379 3379 foreach ( (array) $this->col_info as $col ) {