]> granicus.if.org Git - php/commitdiff
- Do not try to draw a table if there are not elements.
authorMarkus Fischer <mfischer@php.net>
Sun, 14 Apr 2002 13:34:52 +0000 (13:34 +0000)
committerMarkus Fischer <mfischer@php.net>
Sun, 14 Apr 2002 13:34:52 +0000 (13:34 +0000)
# If no packages are installed, until now the output was:
#
# INSTALLED PACKAGES:
# ===================
# +
# +
#
# Now it is:
#
# INSTALLED PACKAGES:
# ===================
#
# Which is nicer IMHO. It think keeping the caption is ok.

pear/PEAR/Frontend/CLI.php

index a5e05bfc5464f4d9e32b77fa15633cd668bbda8c..f8e928a463a63b108adab09ea6d2d099dc540d6f 100644 (file)
@@ -223,6 +223,9 @@ class PEAR_Frontend_CLI extends PEAR
         if (!empty($caption)) {
             $this->displayHeading($caption);
         }
+        if (count($table_data) == 0) {
+            return;
+        }
         if (!isset($width)) {
             $width = $widest;
         } else {
@@ -316,4 +319,4 @@ class PEAR_Frontend_CLI extends PEAR
     // }}}
 }
 
-?>
\ No newline at end of file
+?>