Skip to content

Commit e73e439

Browse files
Fixed passing null to integer param
1 parent ed15dba commit e73e439

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Gitonomy/Git/Parser/ParserBase.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected function expects($expected)
5959

6060
protected function consumeShortHash()
6161
{
62-
if (!preg_match('/([A-Za-z0-9]{7,40})/A', $this->content, $vars, null, $this->cursor)) {
62+
if (!preg_match('/([A-Za-z0-9]{7,40})/A', $this->content, $vars, 0, $this->cursor)) {
6363
throw new RuntimeException('No short hash found: '.substr($this->content, $this->cursor, 7));
6464
}
6565

@@ -70,7 +70,7 @@ protected function consumeShortHash()
7070

7171
protected function consumeHash()
7272
{
73-
if (!preg_match('/([A-Za-z0-9]{40})/A', $this->content, $vars, null, $this->cursor)) {
73+
if (!preg_match('/([A-Za-z0-9]{40})/A', $this->content, $vars, 0, $this->cursor)) {
7474
throw new RuntimeException('No hash found: '.substr($this->content, $this->cursor, 40));
7575
}
7676

@@ -81,7 +81,7 @@ protected function consumeHash()
8181

8282
protected function consumeRegexp($regexp)
8383
{
84-
if (!preg_match($regexp.'A', $this->content, $vars, null, $this->cursor)) {
84+
if (!preg_match($regexp.'A', $this->content, $vars, 0, $this->cursor)) {
8585
throw new RuntimeException('No match for regexp '.$regexp.' Upcoming: '.substr($this->content, $this->cursor, 30));
8686
}
8787

0 commit comments

Comments
 (0)