Skip to content
Closed
Changes from all commits
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_array($words) || count($words) == 0) {
Copy link
Contributor

@SavageTiger SavageTiger Jan 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @daum could you please do strict type checking here? (using ===) and rebase this PR on the latest master

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_array($words) || count($words) == 0) && $this->stringUtil->strlen($specialCaseTagInjection) == 0) {
break;
}
if ($specialCaseTagInjectionIsBefore) {
Expand Down