From 02cd72074835a61ce9f81db217f8f73d6687e8dd Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 15 Aug 2017 20:45:57 +1200 Subject: [PATCH] FIX: Remove deprecated assert() usage. This stopped working in PHP 7.2 --- thirdparty/difflib/difflib.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/thirdparty/difflib/difflib.php b/thirdparty/difflib/difflib.php index 4fc8b2039..cf758ce90 100644 --- a/thirdparty/difflib/difflib.php +++ b/thirdparty/difflib/difflib.php @@ -418,7 +418,7 @@ class DiffEngine $i = 0; $j = 0; - assert('sizeof($lines) == sizeof($changed)'); + assert(sizeof($lines) == sizeof($changed)); $len = sizeof($lines); $other_len = sizeof($other_changed); @@ -438,7 +438,7 @@ class DiffEngine $j++; while ($i < $len && !$changed[$i]) { - assert('$j < $other_len && ! $other_changed[$j]'); + assert($j < $other_len && ! $other_changed[$j]); $i++; $j++; while ($j < $other_len && $other_changed[$j]) @@ -471,10 +471,10 @@ class DiffEngine $changed[--$i] = false; while ($start > 0 && $changed[$start - 1]) $start--; - assert('$j > 0'); + assert($j > 0); while ($other_changed[--$j]) continue; - assert('$j >= 0 && !$other_changed[$j]'); + assert($j >= 0 && !$other_changed[$j]); } /* @@ -497,7 +497,7 @@ class DiffEngine while ($i < $len && $changed[$i]) $i++; - assert('$j < $other_len && ! $other_changed[$j]'); + assert($j < $other_len && ! $other_changed[$j]); $j++; if ($j < $other_len && $other_changed[$j]) { $corresponding = $i; @@ -514,10 +514,10 @@ class DiffEngine while ($corresponding < $i) { $changed[--$start] = 1; $changed[--$i] = 0; - assert('$j > 0'); + assert($j > 0); while ($other_changed[--$j]) continue; - assert('$j >= 0 && !$other_changed[$j]'); + assert($j >= 0 && !$other_changed[$j]); } } }