diff options
Diffstat (limited to '')
-rw-r--r-- | lib/BridgeAbstract.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/BridgeAbstract.php b/lib/BridgeAbstract.php index 3a2c47f2..f024393d 100644 --- a/lib/BridgeAbstract.php +++ b/lib/BridgeAbstract.php @@ -314,11 +314,10 @@ abstract class BridgeAbstract implements BridgeInterface if (!isset($context)) { $context = $this->queriedContext; } + $needle = $this->inputs[$this->queriedContext][$input]['value']; foreach (static::PARAMETERS[$context][$input]['values'] as $first_level_key => $first_level_value) { - // todo: this cast emits error if it's an array - $valueString = (string) $first_level_value; - if ($needle === $valueString) { + if (!is_array($first_level_value) && $needle === (string)$first_level_value) { return $first_level_key; } elseif (is_array($first_level_value)) { foreach ($first_level_value as $second_level_key => $second_level_value) { |