MDL-73424 general: Internal methods must have same type as parent
Otherwise the error is thrown in PHP8.1
This commit is contained in:
@@ -133,10 +133,12 @@ class pgsql_native_moodle_recordset extends moodle_recordset {
|
||||
return $row;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current() {
|
||||
return (object)$this->current;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key() {
|
||||
// return first column value as key
|
||||
if (!$this->current) {
|
||||
@@ -146,11 +148,11 @@ class pgsql_native_moodle_recordset extends moodle_recordset {
|
||||
return $key;
|
||||
}
|
||||
|
||||
public function next() {
|
||||
public function next(): void {
|
||||
$this->current = $this->fetch_next();
|
||||
}
|
||||
|
||||
public function valid() {
|
||||
public function valid(): bool {
|
||||
return !empty($this->current);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user