From 2f91a63be37c87e51267ebcaebd97da2a569c688 Mon Sep 17 00:00:00 2001 From: vargenau Date: Thu, 26 Feb 2009 12:35:15 +0000 Subject: [PATCH] If table is empty, do not generate table markup git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@6573 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/plugin/WikicreoleTable.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/plugin/WikicreoleTable.php b/lib/plugin/WikicreoleTable.php index cb58a1113..311213c46 100644 --- a/lib/plugin/WikicreoleTable.php +++ b/lib/plugin/WikicreoleTable.php @@ -98,6 +98,11 @@ extends WikiPlugin $nbrows = sizeof($table); $nbcols = sizeof($table[0]); + // If table is empty, do not generate table markup + if ($nbrows == 0) { + return HTML::raw(''); + } + for ($i=0; $i<$nbrows; $i++) { for ($j=0; $j<$nbcols; $j++) { if (preg_match('/@@/', $table[$i][$j])) { -- 2.45.0