#252 Solution for #248

開啟中
ajdunevent 請求將 1 次代碼提交從 ajdunevent/mysqli_num_rows-NO-BOOL 合併至 diogo/master
共有 1 個文件被更改,包括 3 次插入1 次删除
  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,