From 5fdab09777e87c5e5022be11cc94752c05edcf3b Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 28 Oct 2013 15:39:26 +0000 Subject: [PATCH] Render empty tables as an empty string --- include/html2text.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/html2text.php b/include/html2text.php index f0fdf4fef..4efeada88 100644 --- a/include/html2text.php +++ b/include/html2text.php @@ -588,6 +588,9 @@ class HtmlTable extends HtmlBlockElement { foreach ($rows as $r) $cols = max($cols, count($r)); + if (!$cols) + return ''; + # Find the largest cells in all columns $weights = $mins = array_fill(0, $cols, 0); foreach ($rows as $r) { -- GitLab