Changeset 41480 for branches/3.9/src/wp-includes/wp-db.php
- Timestamp:
- 09/19/2017 03:02:57 PM (7 years ago)
- Location:
- branches/3.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.9
-
branches/3.9/src/wp-includes/wp-db.php
r33995 r41480 1201 1201 $args = func_get_args(); 1202 1202 array_shift( $args ); 1203 1203 1204 // If args were passed as an array (as in vsprintf), move them up 1204 if ( is set( $args[0] ) && is_array($args[0]) )1205 if ( is_array( $args[0] ) && count( $args ) == 1 ) { 1205 1206 $args = $args[0]; 1207 } 1208 1209 foreach ( $args as $arg ) { 1210 if ( ! is_scalar( $arg ) ) { 1211 _doing_it_wrong( 'wpdb::prepare', sprintf( 'Unsupported value type (%s).', gettype( $arg ) ), '3.9.20' ); 1212 } 1213 } 1214 1206 1215 $query = str_replace( "'%s'", '%s', $query ); // in case someone mistakenly already singlequoted it 1207 1216 $query = str_replace( '"%s"', '%s', $query ); // doublequote unquoting
Note: See TracChangeset
for help on using the changeset viewer.