Browse Source

Using separate variable for URL parts

Christoph Hochstrasser 12 years ago
parent
commit
560d6daccf
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/Composer/Repository/ComposerRepository.php

+ 3 - 1
src/Composer/Repository/ComposerRepository.php

@@ -191,7 +191,9 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
         }
 
         try {
-            if ($parts = parse_url($this->url) and isset($parts['path']) and strpos($parts['path'], '/packages.json') !== false) {
+            $jsonUrlParts = parse_url($this->url);
+
+            if (isset($jsonUrlParts['path']) and strpos($jsonUrlParts['path'], '/packages.json') !== false) {
                 $jsonUrl = $this->url;
             } else {
                 $jsonUrl = $this->url . '/packages.json';