mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-08 08:18:08 +01:00
Fixed invalid offset notice in GitVersionInfo.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user