Skip to content

Commit f982ed2

Browse files
authored
Add compatibility with php7.2
Replace count() with strlen() from compatibility with php7.2.
1 parent e51da7e commit f982ed2

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 (strlen($rule['tag']) > 0 &&
172+
strlen($rule['key']) > 0 &&
173173
is_numeric($rule['key'])
174174
) {
175175
$count = 0;

0 commit comments

Comments
 (0)