Fix a small bug where some PEAR channels' category link href doesn't contain a starting forward slash
parent
15d78e6ad1
commit
3f7e7dff33
|
@ -53,6 +53,9 @@ class PearRepository extends ArrayRepository
|
||||||
foreach ($categories as $category) {
|
foreach ($categories as $category) {
|
||||||
$categoryLink = $category->getAttribute("xlink:href");
|
$categoryLink = $category->getAttribute("xlink:href");
|
||||||
$categoryLink = str_replace("info.xml", "packages.xml", $categoryLink);
|
$categoryLink = str_replace("info.xml", "packages.xml", $categoryLink);
|
||||||
|
if ($categoryLink[0] != '/') {
|
||||||
|
$categoryLink = '/' . $categoryLink;
|
||||||
|
}
|
||||||
$packagesXML = $this->requestXml($this->url . $categoryLink);
|
$packagesXML = $this->requestXml($this->url . $categoryLink);
|
||||||
|
|
||||||
$packages = $packagesXML->getElementsByTagName('p');
|
$packages = $packagesXML->getElementsByTagName('p');
|
||||||
|
|
Loading…
Reference in New Issue