From 7270b4223d9d51f3b69ee19d30c9259f983cb7e5 Mon Sep 17 00:00:00 2001 From: Martin Jansen Date: Thu, 7 Feb 2002 20:50:08 +0000 Subject: [PATCH] * Better error handling. --- pear/scripts/pearcmd-remote-list.php | 5 +++++ 1 file changed, 5 insertions(+) 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) { -- 2.50.1