Changeset 33310 for trunk/src/wp-includes/wp-db.php
- Timestamp:
- 07/17/2015 07:06:33 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/wp-db.php
r33308 r33310 2630 2630 if ( is_array( $value['length'] ) ) { 2631 2631 $length = $value['length']['length']; 2632 $truncate_by_byte_length = 'byte' === $value['length']['type']; 2632 2633 } else { 2633 2634 $length = false; 2635 // Since we have no length, we'll never truncate. 2636 // Initialize the variable to false. true would take us 2637 // through an unnecessary (for this case) codepath below. 2638 $truncate_by_byte_length = false; 2634 2639 } 2635 2640 … … 2643 2648 continue; 2644 2649 } 2645 2646 $truncate_by_byte_length = 'byte' === $value['length']['type'];2647 2650 2648 2651 $needs_validation = true; … … 2719 2722 } 2720 2723 2721 $queries[ $col ] = $this->prepare( "CONVERT( LEFT( CONVERT( %s USING $charset ), %.0f ) USING {$this->charset} )", $value['value'], $value['length']['length'] ); 2724 if ( is_array( $value['length'] ) ) { 2725 $queries[ $col ] = $this->prepare( "CONVERT( LEFT( CONVERT( %s USING $charset ), %.0f ) USING {$this->charset} )", $value['value'], $value['length']['length'] ); 2726 } else if ( 'binary' !== $charset ) { 2727 // If we don't have a length, there's no need to convert binary - it will always return the same result. 2728 $queries[ $col ] = $this->prepare( "CONVERT( CONVERT( %s USING $charset ) USING {$this->charset} )", $value['value'] ); 2729 } 2722 2730 2723 2731 unset( $data[ $col ]['db'] );
Note: See TracChangeset
for help on using the changeset viewer.