Skip to content

Commit 4b08188

Browse files
committed
Merge pull request #13 from gondo/patch-1
fixed php warnings
2 parents d197aea + 184b53d commit 4b08188

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HtmlDiff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ private function InsertTag( $tag, $cssClass, &$words ) {
266266
$this->content .= $specialCaseTagInjection . implode( "", $this->ExtractConsecutiveWords( $words, 'tag' ) );
267267
} else {
268268
$workTag = $this->ExtractConsecutiveWords( $words, 'tag' );
269-
if( $this->IsOpeningTag( $workTag[ 0 ] ) && !$this->IsClosingTag( $workTag[ 0 ] ) ) {
269+
if( isset($workTag[0]) && $this->IsOpeningTag( $workTag[ 0 ] ) && !$this->IsClosingTag( $workTag[ 0 ] ) ) {
270270
if( strpos( $workTag[ 0 ], 'class=' ) ) {
271271
$workTag[ 0 ] = str_replace( 'class="', 'class="diffmod ', $workTag[ 0 ] );
272272
$workTag[ 0 ] = str_replace( "class='", 'class="diffmod ', $workTag[ 0 ] );

0 commit comments

Comments
 (0)