From 22d56e80151835442afba7e63e02bcf912e41db1 Mon Sep 17 00:00:00 2001 From: danmarsden Date: Wed, 12 Apr 2006 21:15:10 +0000 Subject: [PATCH] need to check vars aren't empty b4 using them! - another one! --- mod/choice/lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod/choice/lib.php b/mod/choice/lib.php index 9351d1abb1..9264e09049 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -74,7 +74,9 @@ function choice_add_instance($choice) { $option = NULL; $option->text = $value; $option->choiceid = $choice->id; - $option->maxanswers = $choice->{'newlimit'.substr($name, 9)}; + if (isset($choice->{'newlimit'.substr($name, 9)})) { + $option->maxanswers = $choice->{'newlimit'.substr($name, 9)}; + } $option->timemodified = time(); insert_record("choice_options", $option); } -- 2.39.5