From 89b384a05ab6d624c501f2a8f32c7254947b1a73 Mon Sep 17 00:00:00 2001 From: "Michael Adams (mdawaffe)" Date: Wed, 6 May 2015 23:10:18 +0000 Subject: [PATCH] Upgrade: `$wpdb->get_col_length()` sanity check: bail on unexpected return value. See #32165. git-svn-id: https://develop.svn.wordpress.org/trunk@32429 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/upgrade.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php index 8515113f78..1e9dda5b9e 100644 --- a/src/wp-admin/includes/upgrade.php +++ b/src/wp-admin/includes/upgrade.php @@ -1448,6 +1448,11 @@ function upgrade_430() { if ( $wp_current_db_version < 32364 ) { $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',