php-htmldiff
php-htmldiff copied to clipboard
Warning: count(): Parameter must be an array or an object that implements Countable .....
When running demo/index.php I see the following errors (multiple times):
Warning: count(): Parameter must be an array or an object that implements Countable in C:.....\vendor\php-htmldiff-master\HtmlDiff.php on line 360
Warning: count(): Parameter must be an array or an object that implements Countable in C:.....\vendor\php-htmldiff-master\HtmlDiff.php on line 266
wamp PHP Version 7.3.12
This can be fixed changing line 266 from
if( count( $words ) == 0 && count( $specialCaseTagInjection ) == 0 ) {
break;
}
to
if( $words && count( $words ) == 0 && $specialCaseTagInjection && count( $specialCaseTagInjection ) == 0 ) {
break;
}