Skip to content

Commit 1fe7152

Browse files
committed
fix: check string offset exists before using it
1 parent fd9d9f0 commit 1fe7152

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Git/Commit/Footer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(string $token, string $value)
5151
$tokenLower = strtolower($this->token);
5252
$values = preg_split('/[,\s]/', $this->value);
5353
foreach ($values as $val) {
54-
if ($val[0] === '#') {
54+
if (isset($val[0]) && $val[0] === '#') {
5555
$ref = ltrim($val, '#');
5656
$obj = new Reference($ref);
5757
if (in_array($tokenLower, self::TOKEN_CLOSE_ISSUE)) {

0 commit comments

Comments
 (0)