Changeset 30375 for trunk/src/wp-includes/wp-db.php
- Timestamp:
- 11/18/2014 03:37:23 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/wp-db.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/wp-db.php
r30366 r30375 2212 2212 2213 2213 foreach ( $columns as $column ) { 2214 if ( $column->Collation) {2214 if ( ! empty( $column->Collation ) ) { 2215 2215 list( $charset ) = explode( '_', $column->Collation ); 2216 2216 $charsets[ strtolower( $charset ) ] = true; … … 2238 2238 } elseif ( 0 === $count ) { 2239 2239 // No charsets, assume this table can store whatever. 2240 $charset = 'latin1';2240 $charset = false; 2241 2241 } else { 2242 2242 // More than one charset. Remove latin1 if present and recalculate. … … 2292 2292 } 2293 2293 2294 // Skip this entirely if this isn't a MySQL database. 2295 if ( false === $this->is_mysql ) { 2296 return false; 2297 } 2298 2294 2299 if ( empty( $this->table_charset[ $table ] ) ) { 2295 2300 // This primes column information for us. … … 2379 2384 $charset = $value['charset']; 2380 2385 2381 // latin1will happily store anything.2382 if ( 'latin1' === $charset ) {2386 // Column isn't a string, or is latin1, which will will happily store anything. 2387 if ( false === $charset || 'latin1' === $charset ) { 2383 2388 continue; 2384 2389 } 2385 2390 2386 // Column or value isn't a string. 2387 if ( false === $charset || ! is_string( $value['value'] ) ) { 2391 if ( ! is_string( $value['value'] ) ) { 2388 2392 continue; 2389 2393 }
Note: See TracChangeset
for help on using the changeset viewer.