From e0eda2092197a21acd4a05aa313243d939e870b0 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 6 May 2009 10:39:51 +0000 Subject: [PATCH] MDL-19010 reverting last commit- DML must throw exceptions - fix the calling code --- lib/dml/mysqli_native_moodle_database.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/dml/mysqli_native_moodle_database.php b/lib/dml/mysqli_native_moodle_database.php index 354bb906dc..c65662e9e7 100644 --- a/lib/dml/mysqli_native_moodle_database.php +++ b/lib/dml/mysqli_native_moodle_database.php @@ -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) { -- 2.39.5