Skip to content

Commit 29dc002

Browse files
committed
PHP 5.5 compatibility fix
1 parent 8d82ac4 commit 29dc002

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
@@ -177,7 +177,7 @@ private function formatLines($lines)
177177
$lines = array_map(array($this, 'ExpandTabs'), $lines);
178178
$lines = array_map(array($this, 'HtmlSafe'), $lines);
179179
foreach($lines as &$line) {
180-
$line = preg_replace('# ( +)|^ #e', "\$this->fixSpaces('\\1')", $line);
180+
$line = preg_replace_callback('# ( +)|^ #', __CLASS__."::fixSpaces", $line);
181181
}
182182
return $lines;
183183
}
@@ -188,7 +188,7 @@ private function formatLines($lines)
188188
* @param string $spaces The string of spaces.
189189
* @return string The HTML representation of the string.
190190
*/
191-
function fixSpaces($spaces='')
191+
public static function fixSpaces($spaces='')
192192
{
193193
$count = strlen($spaces);
194194
if($count == 0) {

0 commit comments

Comments
 (0)