need to check vars aren't empty b4 using them! - another one!

This commit is contained in:
danmarsden 2006-04-12 21:15:10 +00:00
parent 2475a6c26d
commit 22d56e8015

View file

@ -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);
}