From: jamiesensei Date: Tue, 5 Dec 2006 13:32:32 +0000 (+0000) Subject: fix for error preventing adding of more choices in chat upate form X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a2e67a9a47672837afdf5e91c96d8c341955f7d4;p=moodle.git fix for error preventing adding of more choices in chat upate form --- diff --git a/mod/choice/lib.php b/mod/choice/lib.php index 65164e3c56..5658d87a8c 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -104,7 +104,7 @@ function choice_update_instance($choice) { $option->maxanswers = $choice->limit[$key]; } $option->timemodified = time(); - if (isset($choice->optionid[$key])){//existing choice record + if (isset($choice->optionid[$key]) && !empty($choice->optionid[$key])){//existing choice record $option->id=$choice->optionid[$key]; if (isset($value) && $value <> '') { update_record("choice_options", $option);