We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18845e0 commit 232ff01Copy full SHA for 232ff01
src/PHPHtmlParser/Selector.php
@@ -168,8 +168,8 @@ protected function parseSelectorString($selector)
168
protected function seek(array $nodes, array $rule, array $options)
169
{
170
// XPath index
171
- if (count($rule['tag']) > 0 &&
172
- count($rule['key']) > 0 &&
+ if (is_array($rule['tag']) && count($rule['tag']) > 0 &&
+ is_array($rule['key']) && count($rule['key']) > 0 &&
173
is_numeric($rule['key'])
174
) {
175
$count = 0;
0 commit comments