MDL-79511 auth: Avoid errors on the dynamic properties creation
Currently, Moodle uses fetchOBject() from ADOdb to get the table columns. Sadly, the current ADOdb, especially the fetchObject() function, still creates dynamic properties. Altering the fetchObject() with fetchRow() to avoid the dynamic properties deprecation error on PHP 8.2
This commit is contained in:
+1
-3
@@ -760,9 +760,7 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
$rs->close();
|
||||
|
||||
} else {
|
||||
$fields_obj = $rs->FetchObj();
|
||||
$columns = array_keys((array)$fields_obj);
|
||||
|
||||
$columns = array_keys($rs->fetchRow());
|
||||
echo $OUTPUT->notification(get_string('auth_dbcolumnlist', 'auth_db', implode(', ', $columns)), 'notifysuccess');
|
||||
$rs->close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user