summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-08-21 06:33:12 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-08-21 06:33:12 -0400
commitc8b3557802733f4eb60bad18638298d9acfadf8c (patch)
tree03782b69559bd675cc163bbc754336763b2bce5c
parent3acdda43273ff0c73e98317d06d840f24d40bf99 (diff)
make common_config() handle nulls correctly
-rw-r--r--lib/util.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php
index cd9bd9ed8..d1f3bed9e 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1152,7 +1152,8 @@ function common_negotiate_type($cprefs, $sprefs)
function common_config($main, $sub)
{
global $config;
- return isset($config[$main][$sub]) ? $config[$main][$sub] : false;
+ return (array_key_exists($main, $config) &&
+ array_key_exists($sub, $config[$main])) ? $config[$main][$sub] : false;
}
function common_copy_args($from)