From d398bcd67c76e7786f2d3cc238a8555275e77458 Mon Sep 17 00:00:00 2001 From: Austin McKinley Date: Tue, 10 Apr 2018 09:57:13 -0700 Subject: [PATCH] Fix argument ordering in error message Summary: Before: ``` $ ./config set phabricator.base-uri local.phacility.com:8080 Usage Exception: Config option 'http://' is invalid. The URI must start with https://' or 'phabricator.base-uri'. ``` After: ``` $ ./config set phabricator.base-uri local.phacility.com:8080 Usage Exception: Config option 'phabricator.base-uri' is invalid. The URI must start with http://' or 'https://'. ``` Test Plan: See above Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D19330 --- .../option/PhabricatorCoreConfigOptions.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/applications/config/option/PhabricatorCoreConfigOptions.php b/src/applications/config/option/PhabricatorCoreConfigOptions.php index 0c9e69ebf2..08266217ea 100644 --- a/src/applications/config/option/PhabricatorCoreConfigOptions.php +++ b/src/applications/config/option/PhabricatorCoreConfigOptions.php @@ -268,24 +268,24 @@ EOREMARKUP if ($protocol !== 'http' && $protocol !== 'https') { throw new PhabricatorConfigValidationException( pht( - "Config option '%s' is invalid. The URI must start with ". - "%s' or '%s'.", + 'Config option "%s" is invalid. The URI must start with '. + '"%s" or "%s".', + $key, 'http://', - 'https://', - $key)); + 'https://')); } $domain = $uri->getDomain(); if (strpos($domain, '.') === false) { throw new PhabricatorConfigValidationException( pht( - "Config option '%s' is invalid. The URI must contain a dot ". - "('%s'), like '%s', not just a bare name like '%s'. Some web ". - "browsers will not set cookies on domains with no TLD.", + 'Config option "%s" is invalid. The URI must contain a dot '. + '("%s"), like "%s", not just a bare name like "%s". Some web '. + 'browsers will not set cookies on domains with no TLD.', + $key, '.', 'http://example.com/', - 'http://example/', - $key)); + 'http://example/')); } $path = $uri->getPath();