Changeset 41479 for branches/4.0/src/wp-includes/wp-db.php
- Timestamp:
- 09/19/2017 03:02:25 PM (8 years ago)
- Location:
- branches/4.0
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/wp-db.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
-
branches/4.0/src/wp-includes/wp-db.php
r33994 r41479 1208 1208 $args = func_get_args(); 1209 1209 array_shift( $args ); 1210 1210 1211 // If args were passed as an array (as in vsprintf), move them up 1211 if ( is set( $args[0] ) && is_array($args[0]) )1212 if ( is_array( $args[0] ) && count( $args ) == 1 ) { 1212 1213 $args = $args[0]; 1214 } 1215 1216 foreach ( $args as $arg ) { 1217 if ( ! is_scalar( $arg ) ) { 1218 _doing_it_wrong( 'wpdb::prepare', sprintf( 'Unsupported value type (%s).', gettype( $arg ) ), '4.0.19' ); 1219 } 1220 } 1221 1213 1222 $query = str_replace( "'%s'", '%s', $query ); // in case someone mistakenly already singlequoted it 1214 1223 $query = str_replace( '"%s"', '%s', $query ); // doublequote unquoting
Note: See TracChangeset
for help on using the changeset viewer.