Commit bc1fbf6c authored by Aaron Wells's avatar Aaron Wells
Browse files

Catch exceptions during upgrade due to missing table

Bug 1494133

behatnotneeded: Covered by existing tests

Change-Id: I4c0d93a462fad6a42c2dfca88704d59037357529
parent f2563ac5
......@@ -274,7 +274,13 @@ class Institution {
foreach (array_keys(self::$dbfields) as $fieldname) {
$this->{$fieldname} = $result->{$fieldname};
}
$this->configs = get_records_menu('institution_config', 'institution', $result->name, 'field', 'field, value');
try {
$this->configs = get_records_menu('institution_config', 'institution', $result->name, 'field', 'field, value');
}
catch (SQLException $e) {
$this->configs = false;
}
if (!$this->configs) {
$this->configs = array();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment