aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-13 18:29:39 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-13 18:29:39 +0000
commit3856ca20088fd7c03372d9d1131b1917f6efb525 (patch)
treeb0012c23d4c9fb5545f469451c447b03d86e8137
parent5884aa01d1264004ed16423833eac7928ef235fe (diff)
downloadelgg-3856ca20088fd7c03372d9d1131b1917f6efb525.tar.gz
elgg-3856ca20088fd7c03372d9d1131b1917f6efb525.tar.bz2
git-svn-id: https://code.elgg.org/elgg/trunk@2253 36083f99-b078-4883-b0ff-0f9b5a30f544
-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;