cvs: pear-core /PEAR/REST 10.php
| From: | Greg Beaver | Date: | Thu, 12 May 2005 00:06:01 +0000 |
| Subject: | cvs: pear-core /PEAR/REST 10.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-31778@lists.php.net to get a copy of this message | ||
cellog Wed May 11 20:06:01 2005 EDT
Modified files:
/pear-core/PEAR/REST 10.php
Log:
don't try to retrieve a weird url like
http://pear.php.net/rest/r/pear/deps.Object
id #26.txt
:)
http://cvs.php.net/diff.php/pear-core/PEAR/REST/10.php?r1=1.18&r2=1.19&ty=u
Index: pear-core/PEAR/REST/10.php
diff -u pear-core/PEAR/REST/10.php:1.18 pear-core/PEAR/REST/10.php:1.19
--- pear-core/PEAR/REST/10.php:1.18 Wed May 11 16:42:43 2005
+++ pear-core/PEAR/REST/10.php Wed May 11 20:06:01 2005
@@ -15,7 +15,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: 10.php,v 1.18 2005/05/11 20:42:43 cellog Exp $
+ * @version CVS: $Id: 10.php,v 1.19 2005/05/12 00:06:01 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a12
*/
@@ -468,8 +468,10 @@
PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
$info = $this->_rest->retrieveData($base . 'p/' . strtolower($package) .
'/info.xml');
$latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
'/latest.txt');
- $d = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) .
'/deps.' .
- $latest . '.txt');
+ if (!PEAR::isError($latest)) {
+ $d = $this->_rest->retrieveCacheFirst($base . 'r/' .
strtolower($package) . '/deps.' .
+ $latest . '.txt');
+ }
PEAR::popErrorHandling();
if (PEAR::isError($info)) {
return PEAR::raiseError('Unknown package: "' . $package .
'"');