Skip to content

Commit bbc80e7

Browse files
committed
Avoid empty tables
1 parent 05736bf commit bbc80e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

composer-lock-diff

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ function hasOpt($opt) {
5050
}
5151

5252
function tableize($header, $data) {
53+
if (empty($data)) return '';
54+
5355
$widths = array(maxLength(array_merge(array($header), array_keys($data))));
5456

5557
for($i = 0; $i < count(reset($data)); $i++) {

0 commit comments

Comments
 (0)