Changeset 41482 for branches/3.7/src/wp-includes/wp-db.php
- Timestamp:
- 09/19/2017 03:05:16 PM (9 years ago)
- Location:
- branches/3.7
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
-
branches/3.7/src
- Property svn:mergeinfo changed
/trunk/src merged: 41470
- Property svn:mergeinfo changed
-
branches/3.7/src/wp-includes/wp-db.php
r33997 r41482 1041 1041 $args = func_get_args(); 1042 1042 array_shift( $args ); 1043 1043 1044 // If args were passed as an array (as in vsprintf), move them up 1044 if ( is set( $args[0] ) && is_array($args[0]) )1045 if ( is_array( $args[0] ) && count( $args ) == 1 ) { 1045 1046 $args = $args[0]; 1047 } 1048 1049 foreach ( $args as $arg ) { 1050 if ( ! is_scalar( $arg ) ) { 1051 _doing_it_wrong( 'wpdb::prepare', sprintf( 'Unsupported value type (%s).', gettype( $arg ) ), '3.7.22' ); 1052 } 1053 } 1054 1046 1055 $query = str_replace( "'%s'", '%s', $query ); // in case someone mistakenly already singlequoted it 1047 1056 $query = str_replace( '"%s"', '%s', $query ); // doublequote unquoting
Note: See TracChangeset
for help on using the changeset viewer.