mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
MDL-14679 dml/native_mysqli recordset cleanup
This commit is contained in:
parent
3f0c17b8ef
commit
312dab0dec
1 changed files with 3 additions and 3 deletions
|
@ -24,12 +24,12 @@ class mysqli_native_moodle_recordset extends moodle_recordset {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function current() {
|
public function current() {
|
||||||
return is_null($this->current) ? null : (object)$this->current;
|
return (object)$this->current;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function key() {
|
public function key() {
|
||||||
/// return first column value as key
|
/// return first column value as key
|
||||||
if (is_null($this->current)) {
|
if (!$this->current) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$key = reset($this->current);
|
$key = reset($this->current);
|
||||||
|
@ -45,7 +45,7 @@ class mysqli_native_moodle_recordset extends moodle_recordset {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function valid() {
|
public function valid() {
|
||||||
return !is_null($this->current);
|
return !empty($this->current);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function close() {
|
public function close() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue