mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 18:58:46 +02:00
Fixed invalid offset notice in GitVersionInfo.
This commit is contained in:
parent
7ed1836d59
commit
b6e88db35f
1 changed files with 2 additions and 1 deletions
|
@ -87,12 +87,13 @@ class GitVersionInfo
|
||||||
$filename = $this->project_dir.'/.git/refs/remotes/origin/'.$this->getGitBranchName();
|
$filename = $this->project_dir.'/.git/refs/remotes/origin/'.$this->getGitBranchName();
|
||||||
if (file_exists($filename)) {
|
if (file_exists($filename)) {
|
||||||
$head = file($filename);
|
$head = file($filename);
|
||||||
$hash = $head[0];
|
|
||||||
|
|
||||||
if (!isset($head[0])) {
|
if (!isset($head[0])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hash = $head[0];
|
||||||
|
|
||||||
return substr($hash, 0, $length);
|
return substr($hash, 0, $length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue