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:
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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user