#252 Solution for #248

Open
ajdunevent wants to merge 1 commits from ajdunevent/mysqli_num_rows-NO-BOOL into diogo/master
1 changed files with 3 additions and 1 deletions
  1. 3 1
      extlib/MDB2/Driver/mysqli.php

+ 3 - 1
extlib/MDB2/Driver/mysqli.php

@@ -1644,7 +1644,9 @@ class MDB2_BufferedResult_mysqli extends MDB2_Result_mysqli
      */
     function numRows()
     {
-        $rows = @mysqli_num_rows($this->result);
+        if (is_bool($this->result) === false ) {
+                $rows = @mysqli_num_rows($this->result);
+        }
         if (null === $rows) {
             if (false === $this->result) {
                 return $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,