make common_config() handle nulls correctly

This commit is contained in:
Evan Prodromou 2009-08-21 06:33:12 -04:00
parent 3acdda4327
commit c8b3557802

View File

@ -1152,7 +1152,8 @@ function common_negotiate_type($cprefs, $sprefs)
function common_config($main, $sub) function common_config($main, $sub)
{ {
global $config; 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) function common_copy_args($from)