1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-30 09:09:54 +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;
};
@@ -110,10 +118,7 @@ class App extends Container
};
$this->env = function (App $app) {
$config = $app->config;
$envArgs = empty($config->envArgs) ? array() : $config->envArgs;
return new \Minify_Env($envArgs);
return new \Minify_Env($app->config->envArgs);
};
$this->errorLogHandler = function (App $app) {