Fixed potential bugs

This commit is contained in:
Jan Böhmer 2026-05-11 23:25:21 +02:00
parent a6ef9a58ec
commit 3431320d03
4 changed files with 8 additions and 5 deletions

View file

@ -62,6 +62,9 @@ final readonly class GitVersionInfoProvider
{
if (is_file($this->getGitDirectory() . '/HEAD')) {
$git = file($this->getGitDirectory() . '/HEAD');
if ($git === false) {
return null;
}
$head = explode('/', $git[0], 3);
if (!isset($head[2])) {