aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/configuration.php
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2012-11-27 23:05:03 -0500
committerSteve Clay <steve@mrclay.org>2012-11-27 23:16:35 -0500
commit8e0355da502d3e61e6c5ef66f34831cfbad6506e (patch)
tree3da55a8d68d103611ad8346ba38d5f5ef2fb69ca /engine/lib/configuration.php
parent2f0c5900465d3e12467cc5154394c44b6712759c (diff)
downloadelgg-8e0355da502d3e61e6c5ef66f34831cfbad6506e.tar.gz
elgg-8e0355da502d3e61e6c5ef66f34831cfbad6506e.tar.bz2
elgg_get_config: Don't generate NOTICE if $value not set
Diffstat (limited to 'engine/lib/configuration.php')
-rw-r--r--engine/lib/configuration.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php
index 540312481..b10e51130 100644
--- a/engine/lib/configuration.php
+++ b/engine/lib/configuration.php
@@ -91,7 +91,7 @@ function elgg_get_config($name, $site_guid = 0) {
return $CONFIG->$name;
}
- if ($site_guid === NULL) {
+ if ($site_guid === null) {
// installation wide setting
$value = datalist_get($name);
} else {
@@ -102,15 +102,18 @@ function elgg_get_config($name, $site_guid = 0) {
$site_guid = (int) $CONFIG->site_id;
}
$value = get_config($name, $site_guid);
+ } else {
+ $value = null;
}
}
- if ($value !== false) {
- $CONFIG->$name = $value;
- return $value;
+ // @todo document why we don't cache false
+ if ($value === false) {
+ return null;
}
- return null;
+ $CONFIG->$name = $value;
+ return $value;
}
/**