Use array_key_exists instead of isset, because the latter returns false if the assigned value is null

This commit is contained in:
Arthur Schiwon 2014-03-21 15:29:49 +01:00
parent 055a09e487
commit 86d479cb28
1 changed files with 2 additions and 2 deletions

View File

@ -119,9 +119,9 @@ class Configuration {
$cta = $this->getConfigTranslationArray(); $cta = $this->getConfigTranslationArray();
foreach($config as $inputkey => $val) { foreach($config as $inputkey => $val) {
if(strpos($inputkey, '_') !== false && isset($cta[$inputkey])) { if(strpos($inputkey, '_') !== false && array_key_exists($inputkey, $cta)) {
$key = $cta[$inputkey]; $key = $cta[$inputkey];
} elseif(isset($this->config[$inputkey])) { } elseif(array_key_exists($inputkey, $this->config)) {
$key = $inputkey; $key = $inputkey;
} else { } else {
continue; continue;