From 8efa9b3e419f086446062d7c0bf162cd8a9c1b1d Mon Sep 17 00:00:00 2001 From: sharvey Date: Fri, 26 Mar 2010 01:54:18 +0000 Subject: [PATCH] BUGFIX Fixed InstallerRequirements::isApache() which didn't work if $_SERVER['SERVER_SIGNATURE'] is available for Apache git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@101733 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- install.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/install.php b/install.php index d569e31..a7b7db3 100644 --- a/install.php +++ b/install.php @@ -277,15 +277,16 @@ class InstallRequirements { } function isApache() { - $webserver = strip_tags(trim(@$_SERVER['SERVER_SIGNATURE'])); - if(!$webserver) { - if(isset($_SERVER['SERVER_SOFTWARE'])) { - if(strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) { - return true; - } - } + $signature = isset($_SERVER['SERVER_SIGNATURE']) + ? $_SERVER['SERVER_SIGNATURE'] + : @$_SERVER['SERVER_SOFTWARE']; + + $signature = strip_tags(trim($signature)); + if($signature && strpos($signature, 'Apache') !== false) { + return true; + } else { + return false; } - return false; } function findWebserver() {