From: Evan Prodromou Date: Fri, 21 Aug 2009 10:33:12 +0000 (-0400) Subject: make common_config() handle nulls correctly X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c8b3557802733f4eb60bad18638298d9acfadf8c;p=quix0rs-gnu-social.git make common_config() handle nulls correctly --- diff --git a/lib/util.php b/lib/util.php index cd9bd9ed83..d1f3bed9e1 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)