Changeset 41496 for trunk/src/wp-includes/wp-db.php
- Timestamp:
- 09/19/2017 05:55:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/wp-db.php
r41483 r41496 1253 1253 $query = preg_replace( '|(?<!%)%f|' , '%F', $query ); // Force floats to be locale unaware 1254 1254 $query = preg_replace( '|(?<!%)%s|', "'%s'", $query ); // quote the strings, avoiding escaped strings like %%s 1255 $query = preg_replace( '/%(?:%|$|([^dsF]))/', '%%\\1', $query ); // escape any unescaped percents 1255 1256 array_walk( $args, array( $this, 'escape_by_ref' ) ); 1256 1257 return @vsprintf( $query, $args ); … … 2822 2823 2823 2824 if ( is_array( $value['length'] ) ) { 2824 $queries[ $col ] = $this->prepare( "CONVERT( LEFT( CONVERT( %s USING $charset ), %.0f ) USING $connection_charset )", $value['value'], $value['length']['length'] ); 2825 $length = sprintf( '%.0f', $value['length']['length'] ); 2826 $queries[ $col ] = $this->prepare( "CONVERT( LEFT( CONVERT( %s USING $charset ), $length ) USING $connection_charset )", $value['value'] ); 2825 2827 } else if ( 'binary' !== $charset ) { 2826 2828 // If we don't have a length, there's no need to convert binary - it will always return the same result.
Note: See TracChangeset
for help on using the changeset viewer.