From dd164ae5ffc4b3ddbd932f7de2fdddc68ca2919c Mon Sep 17 00:00:00 2001 From: azammitdcarf Date: Fri, 15 Jan 2010 01:55:50 +0000 Subject: [PATCH] Bug fix when list empty --- admin/new.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/admin/new.php b/admin/new.php index d391c002..dbb7d323 100644 --- a/admin/new.php +++ b/admin/new.php @@ -120,11 +120,14 @@ $sql = "SELECT s.sid as sid, sl.surveyls_title AS title WHERE s.active = 'Y'"; $surveys = $db->GetAll($sql); -foreach($surveys as $s) -{ - print "" . T_("Existing questionnaire:") . " {$s['title']}"; -} +if (!empty($surveys)) +{ + foreach($surveys as $s) + { + print "" . T_("Existing questionnaire:") . " {$s['title']}"; + } +} ?>
echo T_("Restrict appointments to shifts?"); ?>
echo T_("Restrict work to shifts?"); ?>