Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues upgrading to PHP8 #41

Open
a4992214 opened this issue Jun 5, 2023 · 0 comments
Open

Issues upgrading to PHP8 #41

a4992214 opened this issue Jun 5, 2023 · 0 comments

Comments

@a4992214
Copy link

a4992214 commented Jun 5, 2023

Migrating to PHP8 will cause a problem with the use of the class name "Match".
Recommend you change the three occurrences to "HtmlDiffMatch".

Line 342 changed to:
$matches[] = new HtmlDiffMatch( count( $this->oldWords ), count( $this->newWords ), 0 );

Line 360:

if( count( $match ) != 0 ) {
	$operations[] = new Operation( 'equal', $match->StartInOld, $match->EndInOld(), $match->StartInNew, $match->EndInNew() );
}

changed to

$operations[] = new Operation( 'equal', $match->StartInOld, $match->EndInOld(), $match->StartInNew, $match->EndInNew() );

Line 428 changed to:
return $bestMatchSize != 0 ? new HtmlDiffMatch( $bestMatchInOld, $bestMatchInNew, $bestMatchSize ) : null;

Line 432 changed to:
class HtmlDiffMatch {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant