aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/elgglib.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 5d31354eb..e7bdbe665 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -1478,14 +1478,10 @@
$name = sanitise_string($name);
if (isset($DATALIST_CACHE[$name]))
return $DATALIST_CACHE[$name];
-
- 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.
+
+ if ($row = get_data_row("select value from {$CONFIG->dbprefix}datalists where name = '{$name}'")) {
+ $DATALIST_CACHE[$name] = $row->value;
+ return $row->value;
}
return false;