BUGFIX: Prevent infinite loop

Prevent infinite loop when a < is present without a matching >
This commit is contained in:
Mike Cochrane 2017-05-10 11:32:09 +12:00 committed by Mike Cochrane
parent ff35baaeab
commit 4373bdb991

View File

@ -182,6 +182,9 @@ class Diff extends \Diff
$newChunk = $item;
while ($item[strlen($item)-1] != ">") {
$chunk = each($candidateChunks);
if ($chunk === false) {
break;
}
$item = $chunk['value'];
$newChunk .= ' ' . $item;
}