From cfd130d33af54e6938c25e5484d01e4946fd0935 Mon Sep 17 00:00:00 2001 From: Michael Adams Date: Wed, 6 May 2015 23:13:58 +0000 Subject: [PATCH] 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 --- wp-admin/includes/upgrade.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 67ec9210c5..2f40cce47e 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -1347,6 +1347,11 @@ function upgrade_405() { if ( $wp_current_db_version < 29632 ) { $content_length = $wpdb->get_col_length( $wpdb->comments, 'comment_content' ); + + if ( is_wp_error( $content_length ) ) { + return; + } + if ( false === $content_length ) { $content_length = array( 'type' => 'byte',