Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Caxy/HtmlDiff/HtmlDiff.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ protected function findIsolatedDiffTagsInOld($operation, $posInNew)
protected function insertTag($tag, $cssClass, &$words)
{
while (true) {
if (count($words) == 0) {
if (!is_countable($words) || count($words) == 0) {
break;
}

Expand Down Expand Up @@ -567,7 +567,7 @@ protected function insertTag($tag, $cssClass, &$words)
}
}
}
if (count($words) == 0 && $this->stringUtil->strlen($specialCaseTagInjection) == 0) {
if ((!is_countable($words) || count($words) == 0) && $this->stringUtil->strlen($specialCaseTagInjection) == 0) {
break;
}
if ($specialCaseTagInjectionIsBefore) {
Expand Down