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

do not require SERVER_SOFTWARE being present in $server

This commit is contained in:
Elan Ruusamäe
2016-01-20 16:00:39 +02:00
parent cd49391833
commit 22d34533ac

View File

@@ -78,8 +78,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(