diff --git a/src/Parser/CssToXpath.php b/src/Parser/CssToXpath.php index 53e0bfa..3744d18 100644 --- a/src/Parser/CssToXpath.php +++ b/src/Parser/CssToXpath.php @@ -50,7 +50,7 @@ public static function processAttr($attr, $element, $hash) { $parser = new \Transphporm\Parser\Value($functionSet, true); $return = $parser->parseTokens($attr, $attributes); - return $return[0] === '' ? false : $return[0]; + return is_array($return[0]) || $return[0] === '' ? false : $return[0]; } public function cleanup() { @@ -97,7 +97,7 @@ private function removeSpacesFromDirectDecend($css) { $tokens->add($split[$i]->trim()); if (isset($split[$i+1])) $tokens->add(['type' => Tokenizer::GREATER_THAN]); } - + return $tokens; }