From 2eb69f120e5ca704e28fedbb3240ef84e61eb419 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 25 Feb 2015 19:30:51 +0000 Subject: [PATCH] Move check to follow the previous code change --- src/Composer/Util/Git.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Composer/Util/Git.php b/src/Composer/Util/Git.php index 00c909b9d..e965384e7 100644 --- a/src/Composer/Util/Git.php +++ b/src/Composer/Util/Git.php @@ -53,12 +53,12 @@ class Git } $protocols = $this->config->get('github-protocols'); + if (!is_array($protocols)) { + throw new \RuntimeException('Config value "github-protocols" must be an array, got '.gettype($protocols)); + } // public github, autoswitch protocols if (preg_match('{^(?:https?|git)://'.self::getGitHubDomainsRegex($this->config).'/(.*)}', $url, $match)) { - if (!is_array($protocols)) { - throw new \RuntimeException('Config value "github-protocols" must be an array, got '.gettype($protocols)); - } $messages = array(); foreach ($protocols as $protocol) { if ('ssh' === $protocol) {