nlopess Wed Sep 5 19:08:42 2007 UTC
Modified files:
/phpdoc/scripts/iniupdate pecl.php
Log:
fix for pecl packages without releases
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/iniupdate/pecl.php?r1=1.2&r2=1.3&diff_format=u
Index: phpdoc/scripts/iniupdate/pecl.php
diff -u phpdoc/scripts/iniupdate/pecl.php:1.2
phpdoc/scripts/iniupdate/pecl.php:1.3
--- phpdoc/scripts/iniupdate/pecl.php:1.2 Wed Sep 5 18:26:35 2007
+++ phpdoc/scripts/iniupdate/pecl.php Wed Sep 5 19:08:41 2007
@@ -39,7 +39,12 @@
{
try {
$releases = array();
- $XE = @new
SimpleXMLElement("http://pecl.php.net/rest/r/$package/allreleases.xml", NULL,
true); //@ sucks, but the XML doesn't like me
+ $url = "http://pecl.php.net/rest/r/$package/allreleases.xml";
+
+ // simplexml doesnt seem to be able to handle the 404 errors as I
would like..
+ if (@file_get_contents($url, null, 0, 0, 1) === false) return
$releases;
+
+ $XE = @new SimpleXMLElement($url, NULL, true);
foreach ($XE as $Element) {
if ($Element->getName() == 'r') {