From: Martin Jansen Date: Thu, 7 Feb 2002 20:50:08 +0000 (+0000) Subject: * Better error handling. X-Git-Tag: php-4.2.0RC1~399 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7270b4223d9d51f3b69ee19d30c9259f983cb7e5;p=php * Better error handling. --- diff --git a/pear/scripts/pearcmd-remote-list.php b/pear/scripts/pearcmd-remote-list.php index d30a4679fe..e0bd896621 100644 --- a/pear/scripts/pearcmd-remote-list.php +++ b/pear/scripts/pearcmd-remote-list.php @@ -3,6 +3,11 @@ $remote = new PEAR_Remote($config); $result = $remote->call('package.listAll', 1); $i = $j = 0; + +if (PEAR::isError($result)) { + die("\n\n Error while executing command!\n\n"); +} + heading("Available packages"); foreach ($result as $package => $info) { if ($i++ % 20 == 0) {