MDL-60281 general: function each() is deprecated in PHP7.2

This commit is contained in:
Marina Glancy
2017-10-16 09:37:20 +08:00
parent 484b43f456
commit 33683bc80c
11 changed files with 29 additions and 20 deletions
+3 -3
View File
@@ -247,14 +247,14 @@ class _WikiDiffEngine
continue;
$matches = $ymatches[$line];
reset($matches);
while (list ($junk, $y) = each($matches))
foreach ($matches as $y)
if (empty($this->in_seq[$y])) {
$k = $this->_lcs_pos($y);
USE_ASSERTS_IN_WIKI && assert($k > 0);
$ymids[$k] = $ymids[$k-1];
break;
}
while (list ($junk, $y) = each($matches)) {
}
foreach ($matches as $y) {
if ($y > $this->seq[$k-1]) {
USE_ASSERTS_IN_WIKI && assert($y < $this->seq[$k]);
// Optimization: this is a common case: