Upgrade: `$wpdb->get_col_length()` sanity check: bail on unexpected return value.

Merges [32429] for the 4.0 branch.

See #32165.

Built from https://develop.svn.wordpress.org/branches/4.0@32432


git-svn-id: http://core.svn.wordpress.org/branches/4.0@32402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Michael Adams 2015-05-06 23:13:58 +00:00
parent 551057bb68
commit cfd130d33a
1 changed files with 5 additions and 0 deletions

View File

@ -1347,6 +1347,11 @@ function upgrade_405() {
if ( $wp_current_db_version < 29632 ) { if ( $wp_current_db_version < 29632 ) {
$content_length = $wpdb->get_col_length( $wpdb->comments, 'comment_content' ); $content_length = $wpdb->get_col_length( $wpdb->comments, 'comment_content' );
if ( is_wp_error( $content_length ) ) {
return;
}
if ( false === $content_length ) { if ( false === $content_length ) {
$content_length = array( $content_length = array(
'type' => 'byte', 'type' => 'byte',