From d22e6b277f74b97060ab46fa8a6f5b255d08da99 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 11 Jun 2011 14:41:05 -0700 Subject: [PATCH] Fix http / https check in setup Summary: There was a last-minute edit to this to fix a typo before rP089d8327 landed which accidentally made it impossible to pass the check. :) Test Plan: Put install into setup mode, changed protocol to 'http', 'ftp'. Reviewed By: cadamo Reviewers: toulouse, codeblock, cadamo Commenters: toulouse, codeblock CC: aran, cadamo, toulouse, codeblock Differential Revision: 434 --- src/infrastructure/setup/PhabricatorSetup.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/infrastructure/setup/PhabricatorSetup.php b/src/infrastructure/setup/PhabricatorSetup.php index 4a3b38d3c8..d6185c2e7e 100644 --- a/src/infrastructure/setup/PhabricatorSetup.php +++ b/src/infrastructure/setup/PhabricatorSetup.php @@ -132,7 +132,11 @@ class PhabricatorSetup { } else { $host = PhabricatorEnv::getEnvConfig('phabricator.base-uri'); $protocol = id(new PhutilURI($host))->getProtocol(); - if (!($protocol === 'http') || !($protocol === 'https')) { + $allowed_protocols = array( + 'http' => true, + 'https' => true, + ); + if (empty($allowed_protocols[$protocol])) { self::writeFailure(); self::write( "You must specify the protocol over which your host works (e.g.: ".