1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-12 09:05:08 +02:00

Merge pull request #501 from glensc/minify-env

do not require SERVER_SOFTWARE being present in $server
This commit is contained in:
Steve Clay
2016-06-08 10:14:02 -04:00

View File

@@ -113,8 +113,7 @@ class Minify_Env {
*/
protected function computeDocRoot(array $server)
{
if (empty($server['SERVER_SOFTWARE'])
|| 0 !== strpos($server['SERVER_SOFTWARE'], 'Microsoft-IIS/')) {
if (isset($server['SERVER_SOFTWARE']) && 0 !== strpos($server['SERVER_SOFTWARE'], 'Microsoft-IIS/')) {
throw new InvalidArgumentException('DOCUMENT_ROOT is not provided and could not be computed');
}
$docRoot = substr(