diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/elgglib.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index e7bdbe665..5d31354eb 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1478,10 +1478,14 @@ $name = sanitise_string($name); if (isset($DATALIST_CACHE[$name])) return $DATALIST_CACHE[$name]; -
- if ($row = get_data_row("select value from {$CONFIG->dbprefix}datalists where name = '{$name}'")) { - $DATALIST_CACHE[$name] = $row->value;
- return $row->value;
+ + try {
+ if ($row = get_data_row("select value from {$CONFIG->dbprefix}datalists where name = '{$name}'")) { + $DATALIST_CACHE[$name] = $row->value;
+ return $row->value;
+ } + } catch (DatabaseException $e) { + return false; // Likely can't handle the exception so just return false. }
return false;
|