1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-17 22:45:54 +02:00

MDL-14679 dml/native_mysqli recordset cleanup

This commit is contained in:
skodak 2008-10-26 13:00:53 +00:00
parent 3f0c17b8ef
commit 312dab0dec

@ -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() {