From b6e88db35f53087e7fae66a24cdca14d5e910d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 29 Mar 2020 22:12:26 +0200 Subject: [PATCH] Fixed invalid offset notice in GitVersionInfo. --- src/Services/GitVersionInfo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Services/GitVersionInfo.php b/src/Services/GitVersionInfo.php index cdb74c8e..35669936 100644 --- a/src/Services/GitVersionInfo.php +++ b/src/Services/GitVersionInfo.php @@ -87,12 +87,13 @@ class GitVersionInfo $filename = $this->project_dir.'/.git/refs/remotes/origin/'.$this->getGitBranchName(); if (file_exists($filename)) { $head = file($filename); - $hash = $head[0]; if (!isset($head[0])) { return null; } + $hash = $head[0]; + return substr($hash, 0, $length); }