From d28971a2b65a7b3353e932a08fbb73b59ca05214 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Sat, 6 Dec 2003 23:44:23 +0000 Subject: [PATCH] MFH --- pear/PEAR/Command/Remote.php | 2 +- pear/PEAR/Remote.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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]); -- 2.50.1