Skip to content

Commit 3c2f67a

Browse files
authored
Don't pass null as second parameter to preg_match (#190)
1 parent 5035f69 commit 3c2f67a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Gitonomy/Git/Parser/DiffParser.php

+2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ protected function doParse()
9090

9191
$oldName = $oldName === '/dev/null' ? null : substr($oldName, 2);
9292
$newName = $newName === '/dev/null' ? null : substr($newName, 2);
93+
$oldIndex !== null ?: '';
94+
$newIndex !== null ?: '';
9395
$oldIndex = preg_match('/^0+$/', $oldIndex) ? null : $oldIndex;
9496
$newIndex = preg_match('/^0+$/', $newIndex) ? null : $newIndex;
9597
$file = new File($oldName, $newName, $oldMode, $newMode, $oldIndex, $newIndex, $isBinary);

0 commit comments

Comments
 (0)