1
0
Fork 0

Fix non-array return value in some cases on php 5.3.2, fixes #927

pull/928/head
Jordi Boggiano 2012-07-18 14:22:46 +02:00
parent 84dd1fc1bf
commit 5ec41d83b4
1 changed files with 10 additions and 7 deletions

View File

@ -115,13 +115,16 @@ class ChannelRest11Reader extends BaseChannelReader
}
$releases = array();
foreach ($packageInfo->xpath('ns:a/ns:r') as $node) {
$releaseVersion = (string) $node->v;
$releaseStability = (string) $node->s;
$releases[$releaseVersion] = new ReleaseInfo(
$releaseStability,
isset($dependencies[$releaseVersion]) ? $dependencies[$releaseVersion] : new DependencyInfo(array(), array())
);
$releasesInfo = $packageInfo->xpath('ns:a/ns:r');
if ($releasesInfo) {
foreach ($releasesInfo as $node) {
$releaseVersion = (string) $node->v;
$releaseStability = (string) $node->s;
$releases[$releaseVersion] = new ReleaseInfo(
$releaseStability,
isset($dependencies[$releaseVersion]) ? $dependencies[$releaseVersion] : new DependencyInfo(array(), array())
);
}
}
return new PackageInfo(