Skip to content

Commit c9ba1fa

Browse files
committed
Fixed index out of range bug
1 parent 4b7bd1e commit c9ba1fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HtmlDiff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ private function InsertTag( $tag, $cssClass, &$words ) {
324324
$this->content .= $specialCaseTagInjection . implode( "", $this->ExtractConsecutiveWords( $words, 'tag' ) );
325325
} else {
326326
$workTag = $this->ExtractConsecutiveWords( $words, 'tag' );
327-
if( $this->IsOpeningTag( $workTag[ 0 ] ) && !$this->IsClosingTag( $workTag[ 0 ] ) ) {
327+
if( isset( $workTag[ 0 ] ) && $this->IsOpeningTag( $workTag[ 0 ] ) && !$this->IsClosingTag( $workTag[ 0 ] ) ) {
328328
if( strpos( $workTag[ 0 ], 'class=' ) ) {
329329
$workTag[ 0 ] = str_replace( 'class="', 'class="diffmod ', $workTag[ 0 ] );
330330
$workTag[ 0 ] = str_replace( "class='", 'class="diffmod ', $workTag[ 0 ] );

0 commit comments

Comments
 (0)