1
0
mirror of https://github.com/mrclay/minify.git synced 2025-09-01 09:53:36 +02:00

Make sure $min_documentRoot is copied into Env.

Fixes #585
This commit is contained in:
Steve Clay
2017-04-03 16:36:33 -04:00
parent 532a010e0e
commit 62370404c8

View File

@@ -77,6 +77,14 @@ class App extends Container
} }
} }
if ($config->documentRoot) {
// copy into env
if (empty($config->envArgs['server'])) {
$config->envArgs['server'] = $_SERVER;
}
$config->envArgs['server']['DOCUMENT_ROOT'] = $config->documentRoot;
}
return $config; return $config;
}; };
@@ -110,10 +118,7 @@ class App extends Container
}; };
$this->env = function (App $app) { $this->env = function (App $app) {
$config = $app->config; return new \Minify_Env($app->config->envArgs);
$envArgs = empty($config->envArgs) ? array() : $config->envArgs;
return new \Minify_Env($envArgs);
}; };
$this->errorLogHandler = function (App $app) { $this->errorLogHandler = function (App $app) {