Skip to content

Commit 28c7dda

Browse files
committed
Fix use of count in PHP 7.2
1 parent dafa8b4 commit 28c7dda

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/PHPHtmlParser/Selector.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ 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 (!empty($rule['tag']) &&
173172
is_numeric($rule['key'])
174173
) {
175174
$count = 0;

0 commit comments

Comments
 (0)