From: Greg Beaver Date: Sat, 6 Dec 2003 23:44:23 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.3.5RC1~99 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d28971a2b65a7b3353e932a08fbb73b59ca05214;p=php MFH --- diff --git a/pear/PEAR/Command/Remote.php b/pear/PEAR/Command/Remote.php index 0235b4c85a..d6b0f423c8 100644 --- a/pear/PEAR/Command/Remote.php +++ b/pear/PEAR/Command/Remote.php @@ -352,7 +352,7 @@ parameter. 'border' => 1, 'headline' => array('Package', 'Local', 'Remote', 'Size'), ); - foreach ($latest as $pkg => $info) { + foreach ((array)$latest as $pkg => $info) { $package = strtolower($pkg); if (!isset($inst[$package])) { // skip packages we don't have installed diff --git a/pear/PEAR/Remote.php b/pear/PEAR/Remote.php index b49b674d2c..80dff12f7a 100644 --- a/pear/PEAR/Remote.php +++ b/pear/PEAR/Remote.php @@ -307,7 +307,8 @@ class PEAR_Remote extends PEAR null, null, $ret['userinfo']); } } - } elseif (is_array($ret) && sizeof($ret) == 1 && is_array($ret[0]) && + } elseif (is_array($ret) && sizeof($ret) == 1 && isset($ret[0]) + && is_array($ret[0]) && !empty($ret[0]['faultString']) && !empty($ret[0]['faultCode'])) { extract($ret[0]);