Skip to content

Commit f20b65d

Browse files
committed
Fix selector
1 parent 9663472 commit f20b65d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PHPHtmlParser/Selector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +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 &&
171+
if (is_array($rule['tag']) &&
172+
count($rule['tag']) > 0 &&
172173
count($rule['key']) > 0 &&
173174
is_numeric($rule['key'])
174175
) {

0 commit comments

Comments
 (0)