mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 15:31:42 +01:00
Eliminate error suppression for mysql_free_result() and only call it when the result is actually a resource. Depending on the query, mysql_query() can return a boolean rather than a resource, hence the original use of error suppression.
Fixes a warning introduced in [21472] when calling mysql_free_result() was moved to flush(). fixes #20838. git-svn-id: http://core.svn.wordpress.org/trunk@21511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
96156ac36c
commit
c11a4c09e8
@ -130,6 +130,15 @@ class wpdb {
|
||||
*/
|
||||
var $last_result;
|
||||
|
||||
/**
|
||||
* MySQL result, which is either a resource or boolean.
|
||||
*
|
||||
* @since unknown
|
||||
* @access protected
|
||||
* @var mixed
|
||||
*/
|
||||
protected $result;
|
||||
|
||||
/**
|
||||
* Saved info on the table column
|
||||
*
|
||||
@ -1076,7 +1085,9 @@ class wpdb {
|
||||
$this->last_result = array();
|
||||
$this->col_info = null;
|
||||
$this->last_query = null;
|
||||
@mysql_free_result( $this->result );
|
||||
|
||||
if ( is_resource( $this->result ) )
|
||||
mysql_free_result( $this->result );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user