Skip to content

Commit 232ff01

Browse files
committed
fix
1 parent 18845e0 commit 232ff01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PHPHtmlParser/Selector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ protected function parseSelectorString($selector)
168168
protected function seek(array $nodes, array $rule, array $options)
169169
{
170170
// XPath index
171-
if (count($rule['tag']) > 0 &&
172-
count($rule['key']) > 0 &&
171+
if (is_array($rule['tag']) && count($rule['tag']) > 0 &&
172+
is_array($rule['key']) && count($rule['key']) > 0 &&
173173
is_numeric($rule['key'])
174174
) {
175175
$count = 0;

0 commit comments

Comments
 (0)