From fea05546d1b8a4809c17b7e28ada9a7d4e5ec885 Mon Sep 17 00:00:00 2001 From: james Date: Mon, 26 Feb 2007 21:43:39 +0000 Subject: [PATCH] Fixed the reports_schoolprojects report to not error when there are no projects --- admin/reports_schoolprojects.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/admin/reports_schoolprojects.php b/admin/reports_schoolprojects.php index 211cddd..90ed0c1 100644 --- a/admin/reports_schoolprojects.php +++ b/admin/reports_schoolprojects.php @@ -113,8 +113,12 @@ $table['data'][]=array($proj->projectnumber,$proj->title,$students); } - $rep->addTable($table); - unset($table); + //we only add the table if there something to add, otherwise, the report must still be blank + if(is_array($table)) + { + $rep->addTable($table); + unset($table); + } $rep->output(); ?>