From: Mark A. Hershberger Date: Fri, 5 Mar 2010 20:40:43 +0000 (+0000) Subject: tests are showing mResultSet is sometimes false when it free() is run, so adding... X-Git-Tag: 1.31.0-rc.0~37547 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=2b50b7a522ea5659415ee17e7295cc65bac51c6f;p=lhc%2Fweb%2Fwiklou.git tests are showing mResultSet is sometimes false when it free() is run, so adding defensive ifs --- diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index 69ef51aa23..7f80447125 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -557,6 +557,9 @@ class SqlSearchResultSet extends SearchResultSet { } function numRows() { + if ($this->mResultSet === false ) + return false; + return $this->mResultSet->numRows(); } @@ -571,6 +574,9 @@ class SqlSearchResultSet extends SearchResultSet { } function free() { + if ($this->mResultSet === false ) + return false; + $this->mResultSet->free(); } }