From 312dab0dec4d4a1df484b979938e6aa3c69bb8e9 Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 26 Oct 2008 13:00:53 +0000 Subject: [PATCH] MDL-14679 dml/native_mysqli recordset cleanup --- lib/dml/mysqli_native_moodle_recordset.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dml/mysqli_native_moodle_recordset.php b/lib/dml/mysqli_native_moodle_recordset.php index 98baa8592f..7917676a4c 100644 --- a/lib/dml/mysqli_native_moodle_recordset.php +++ b/lib/dml/mysqli_native_moodle_recordset.php @@ -24,12 +24,12 @@ class mysqli_native_moodle_recordset extends moodle_recordset { } public function current() { - return is_null($this->current) ? null : (object)$this->current; + return (object)$this->current; } public function key() { /// return first column value as key - if (is_null($this->current)) { + if (!$this->current) { return false; } $key = reset($this->current); @@ -45,7 +45,7 @@ class mysqli_native_moodle_recordset extends moodle_recordset { } public function valid() { - return !is_null($this->current); + return !empty($this->current); } public function close() { -- 2.39.5