From 92b8c22e0317716ea59d73ccf1c63d5667797a3c Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 12 Nov 2010 10:40:43 +0000 Subject: [PATCH] Only mysql_free_result if we have a valid resource, and remove error suppression there. see #15402. git-svn-id: https://develop.svn.wordpress.org/trunk@16321 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/wp-db.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 2cc9e30a21..8e58009f31 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -1015,7 +1015,8 @@ class wpdb { * @return void */ function flush() { - @mysql_free_result( $this->_mysql_last_result ); + if ( is_resource( $this->_mysql_last_result ) ) + mysql_free_result( $this->_mysql_last_result ); $this->col_info = null; $this->last_query = null; }