Merge pull request #6901 from mikenz/patch-12

BUGFIX: Prevent infinite loop
This commit is contained in:
Daniel Hensby 2017-05-11 12:00:28 +01:00 committed by GitHub
commit fac2bab785
1 changed files with 3 additions and 0 deletions

View File

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