Skip to content

Commit 5d8ade8

Browse files
committed
use index instead of an assumption of a constant
1 parent edc62b4 commit 5d8ade8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Diff/Renderer/Html/Array.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ public function mb_substr_replace($string, $replacement, $start, $length=NULL) {
9191
preg_match_all('/./us', (string)$string, $smatches);
9292
preg_match_all('/./us', (string)$replacement, $rmatches);
9393
if ($length === NULL) $length = mb_strlen($string);
94-
array_splice($smatches[0], $start, $length, $rmatches[0]);
95-
return join($smatches[0]);
94+
array_splice($smatches['0'], $start, $length, $rmatches[0]);
95+
return join($smatches['0']);
9696
}
9797

9898
/**

0 commit comments

Comments
 (0)