Changeset 41473 for branches/4.6/src/wp-includes/wp-db.php
- Timestamp:
- 09/19/2017 02:59:26 PM (9 years ago)
- Location:
- branches/4.6
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/wp-db.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6
-
branches/4.6/src/wp-includes/wp-db.php
r38581 r41473 1299 1299 $args = func_get_args(); 1300 1300 array_shift( $args ); 1301 1301 1302 // If args were passed as an array (as in vsprintf), move them up 1302 if ( is set( $args[0] ) && is_array($args[0]) )1303 if ( is_array( $args[0] ) && count( $args ) == 1 ) { 1303 1304 $args = $args[0]; 1305 } 1306 1307 foreach ( $args as $arg ) { 1308 if ( ! is_scalar( $arg ) ) { 1309 _doing_it_wrong( 'wpdb::prepare', sprintf( 'Unsupported value type (%s).', gettype( $arg ) ), '4.6.7' ); 1310 } 1311 } 1312 1304 1313 $query = str_replace( "'%s'", '%s', $query ); // in case someone mistakenly already singlequoted it 1305 1314 $query = str_replace( '"%s"', '%s', $query ); // doublequote unquoting
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)