Browse Source

fix previous commit

Jordi Boggiano 13 năm trước cách đây
mục cha
commit
568d9dabf6
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/Composer/Repository/PearRepository.php

+ 1 - 1
src/Composer/Repository/PearRepository.php

@@ -53,7 +53,7 @@ class PearRepository extends ArrayRepository
         foreach ($categories as $category) {
             $categoryLink = $category->getAttribute("xlink:href");
             $categoryLink = str_replace("info.xml", "packages.xml", $categoryLink);
-            if ($categoryLink[0] != '/') {
+            if ('/' !== substr($categoryLink, 0, 1)) {
                 $categoryLink = '/' . $categoryLink;
             }
             $packagesXML = $this->requestXml($this->url . $categoryLink);