forked from chrisboulton/php-diff
-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
Description
My company was utilizing chrisboulton/php-diff in our code and have had to replace it as part of an ongoing upgrade to PHP 8. We've replaced that repo with this one and ran PHPStan scans on it which returned this notice:
Line \lib\Diff\SequenceMatcher.php
------ -------------------------------------------------------------
372 Call to function unset() contains undefined variable $line.
------ -------------------------------------------------------------
I believe a fix for this would be to simply define $line = '' above the if statement here:
php-diff/lib/jblond/Diff/SequenceMatcher.php
Line 359 in 2dc8344
| if ($this->options['ignoreLines'] == 2) { |