- Quickfix on unexisting SERVER var
This commit is contained in:
parent
7481b8308b
commit
f0082bf0a9
|
@ -61,7 +61,7 @@ class Kernel {
|
||||||
Dotenv::create(getenv("PROJECT_PATH"))->load();
|
Dotenv::create(getenv("PROJECT_PATH"))->load();
|
||||||
|
|
||||||
// Override using headers
|
// Override using headers
|
||||||
if ( ( $keys = getenv('KEYS') ) && ( $auth = $_SERVER["HTTP_X_DEV_AUTH"] ) && in_array($auth, explode(',', $keys)) ) {
|
if ( ( $keys = getenv('KEYS') ) && ( $auth = $_SERVER["HTTP_X_DEV_AUTH"] ?? null ) && in_array($auth, explode(',', $keys)) ) {
|
||||||
foreach (['APP_ENV', 'DEBUG',] as $env) {
|
foreach (['APP_ENV', 'DEBUG',] as $env) {
|
||||||
if (null !== $value = $_SERVER["HTTP_X_$env"] ?? null) {
|
if (null !== $value = $_SERVER["HTTP_X_$env"] ?? null) {
|
||||||
static::putenv($env, $value);
|
static::putenv($env, $value);
|
||||||
|
|
Loading…
Reference in New Issue