possible bug in Text_Diff3::_diff3() #2233

denisarius opened this Issue Mar 21, 2013 · 0 comments


2 participants

denisarius commented Mar 21, 2013

module Diff3, lines 114-115:
if ($e1->orig && $e2->orig) {
$norig = min($e1->norig(), $e2->norig());

The point is that $norig is to be defined in the code following below (lines 122, 126) but under some conditions it is violated. I've faced the problem having experimented with test cases of my own.

Suggested fix: the $norig assignment seems to be placed before the 'if':
$norig = min($e1->norig(), $e2->norig());
if ($e1->orig && $e2->orig) {

I tried the suggested fix and the error didn't emerge anymore.

samdark was assigned Mar 21, 2013

samdark added the Won't Fix label Mar 13, 2017

samdark closed this Mar 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment