Commit dd651000 authored by Donal McMullan's avatar Donal McMullan
Browse files

Prevent installer from dying when table doesn't exist

parent 59293499
......@@ -193,6 +193,10 @@ function get_service_providers($instance) {
global $CFG;
static $cache = array();
if (defined('INSTALLER')) {
return array();
}
if (array_key_exists($instance, $cache)) {
return $cache[$instance];
}
......@@ -222,7 +226,12 @@ function get_service_providers($instance) {
aic3.value = \'1\' AND
a.name = h.appname';
$results = get_records_sql_assoc($query, array('value' => $instance));
try {
$results = get_records_sql_assoc($query, array('value' => $instance));
} catch (SQLException $e) {
// Table doesn't exist yet
return array();
}
if (false == $results) {
$results = 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