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 318d02b commit 236b9a1Copy full SHA for 236b9a1
src/PHPHtmlParser/Selector.php
@@ -169,10 +169,8 @@ protected function parseSelectorString($selector)
169
protected function seek(array $nodes, array $rule, array $options)
170
{
171
// XPath index
172
- if ($rule['tag'] instanceof Countable &&
173
- count($rule['tag']) > 0 &&
174
- $rule['key'] instanceof Countable &&
175
- count($rule['key']) > 0 &&
+ if (array_key_exists('tag', $rule) &&
+ array_key_exists('key', $rule) &&
176
is_numeric($rule['key'])
177
) {
178
$count = 0;
0 commit comments