MDL-19010 reverting last commit- DML must throw exceptions - fix the calling code
authorskodak <skodak>
Wed, 6 May 2009 10:39:51 +0000 (10:39 +0000)
committerskodak <skodak>
Wed, 6 May 2009 10:39:51 +0000 (10:39 +0000)
lib/dml/mysqli_native_moodle_database.php

index 354bb906dc32524ac1502dd8aab28e6b8bc9f88e..c65662e9e7424fca4c2fb5aa7300817055f13a61 100644 (file)
@@ -513,13 +513,10 @@ class mysqli_native_moodle_database extends moodle_database {
 
         $this->query_start($sql, $params, SQL_QUERY_SELECT);
         // no MYSQLI_USE_RESULT here, it would block write ops on affected tables
-        if ($result = $this->mysqli->query($rawsql, MYSQLI_STORE_RESULT)) {
-            $this->query_end($result);
+        $result = $this->mysqli->query($rawsql, MYSQLI_STORE_RESULT);
+        $this->query_end($result);
 
-            return $this->create_recordset($result);
-        } else {
-            return $result;
-        }
+        return $this->create_recordset($result);
     }
 
     protected function create_recordset($result) {