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:
Meirza 2023-09-27 16:43:15 +07:00
parent a72d935dbc
commit 5dd79c7781

View file

@ -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();
}