Changeset 41470 for trunk/src/wp-includes/wp-db.php
- Timestamp:
- 09/19/2017 02:47:46 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/wp-db.php
r41241 r41470 1237 1237 $args = func_get_args(); 1238 1238 array_shift( $args ); 1239 1239 1240 // If args were passed as an array (as in vsprintf), move them up 1240 if ( is set( $args[0] ) && is_array($args[0]) )1241 if ( is_array( $args[0] ) && count( $args ) == 1 ) { 1241 1242 $args = $args[0]; 1243 } 1244 1245 foreach ( $args as $arg ) { 1246 if ( ! is_scalar( $arg ) ) { 1247 _doing_it_wrong( 'wpdb::prepare', sprintf( __( 'Unsupported value type (%s).' ), gettype( $arg ) ), '4.8.2' ); 1248 } 1249 } 1250 1242 1251 $query = str_replace( "'%s'", '%s', $query ); // in case someone mistakenly already singlequoted it 1243 1252 $query = str_replace( '"%s"', '%s', $query ); // doublequote unquoting
Note: See TracChangeset
for help on using the changeset viewer.