[Configuration] Fix open_basedir warnings (#887)
If .git/HEAD isn't in open_basedir it'd throw ugly warnings. Suppress errors while checking if file is readable
This commit is contained in:
parent
7621784598
commit
c4896c7791
1 changed files with 2 additions and 1 deletions
|
@ -107,7 +107,8 @@ class Configuration {
|
||||||
|
|
||||||
$headFile = '.git/HEAD';
|
$headFile = '.git/HEAD';
|
||||||
|
|
||||||
if(file_exists($headFile)) {
|
// '@' is used to mute open_basedir warning
|
||||||
|
if(@is_readable($headFile)) {
|
||||||
|
|
||||||
$revisionHashFile = '.git/' . substr(file_get_contents($headFile), 5, -1);
|
$revisionHashFile = '.git/' . substr(file_get_contents($headFile), 5, -1);
|
||||||
$branchName = explode('/', $revisionHashFile)[3];
|
$branchName = explode('/', $revisionHashFile)[3];
|
||||||
|
|
Loading…
Reference in a new issue