mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: Remove deprecated assert() usage.
This stopped working in PHP 7.2
This commit is contained in:
parent
0926b04512
commit
02cd720748
14
thirdparty/difflib/difflib.php
vendored
14
thirdparty/difflib/difflib.php
vendored
@ -418,7 +418,7 @@ class DiffEngine
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
$j = 0;
|
$j = 0;
|
||||||
|
|
||||||
assert('sizeof($lines) == sizeof($changed)');
|
assert(sizeof($lines) == sizeof($changed));
|
||||||
$len = sizeof($lines);
|
$len = sizeof($lines);
|
||||||
$other_len = sizeof($other_changed);
|
$other_len = sizeof($other_changed);
|
||||||
|
|
||||||
@ -438,7 +438,7 @@ class DiffEngine
|
|||||||
$j++;
|
$j++;
|
||||||
|
|
||||||
while ($i < $len && !$changed[$i]) {
|
while ($i < $len && !$changed[$i]) {
|
||||||
assert('$j < $other_len && ! $other_changed[$j]');
|
assert($j < $other_len && ! $other_changed[$j]);
|
||||||
$i++;
|
$i++;
|
||||||
$j++;
|
$j++;
|
||||||
while ($j < $other_len && $other_changed[$j])
|
while ($j < $other_len && $other_changed[$j])
|
||||||
@ -471,10 +471,10 @@ class DiffEngine
|
|||||||
$changed[--$i] = false;
|
$changed[--$i] = false;
|
||||||
while ($start > 0 && $changed[$start - 1])
|
while ($start > 0 && $changed[$start - 1])
|
||||||
$start--;
|
$start--;
|
||||||
assert('$j > 0');
|
assert($j > 0);
|
||||||
while ($other_changed[--$j])
|
while ($other_changed[--$j])
|
||||||
continue;
|
continue;
|
||||||
assert('$j >= 0 && !$other_changed[$j]');
|
assert($j >= 0 && !$other_changed[$j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -497,7 +497,7 @@ class DiffEngine
|
|||||||
while ($i < $len && $changed[$i])
|
while ($i < $len && $changed[$i])
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
assert('$j < $other_len && ! $other_changed[$j]');
|
assert($j < $other_len && ! $other_changed[$j]);
|
||||||
$j++;
|
$j++;
|
||||||
if ($j < $other_len && $other_changed[$j]) {
|
if ($j < $other_len && $other_changed[$j]) {
|
||||||
$corresponding = $i;
|
$corresponding = $i;
|
||||||
@ -514,10 +514,10 @@ class DiffEngine
|
|||||||
while ($corresponding < $i) {
|
while ($corresponding < $i) {
|
||||||
$changed[--$start] = 1;
|
$changed[--$start] = 1;
|
||||||
$changed[--$i] = 0;
|
$changed[--$i] = 0;
|
||||||
assert('$j > 0');
|
assert($j > 0);
|
||||||
while ($other_changed[--$j])
|
while ($other_changed[--$j])
|
||||||
continue;
|
continue;
|
||||||
assert('$j >= 0 && !$other_changed[$j]');
|
assert($j >= 0 && !$other_changed[$j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user