Skip to content

Commit

Permalink
#187 - fixed array to string conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
TRPB committed Mar 13, 2018
1 parent e1f618d commit 43b17bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Parser/CssToXpath.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 43b17bf

Please sign in to comment.