Skip to content

Commit

Permalink
checking that there remain $oldwrappedids before deleting them lines …
Browse files Browse the repository at this point in the history
…87-..

add         if(is_array($oldwrappedids) && count($oldwrappedids)){
  • Loading branch information
pichetp committed Oct 6, 2007
1 parent aa78ab4 commit 4bc4ca5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions question/type/multianswer/questiontype.php
Expand Up @@ -84,8 +84,10 @@ function save_question_options($question) {
}

// Delete redundant wrapped questions
$oldwrappedids = implode(',', $oldwrappedids);
delete_records_select('question', "id IN ($oldwrappedids)");
if(is_array($oldwrappedids) && count($oldwrappedids)){
$oldwrappedids = implode(',', $oldwrappedids);
delete_records_select('question', "id IN ($oldwrappedids)");
}

if (!empty($sequence)) {
$multianswer = new stdClass;
Expand Down

0 comments on commit 4bc4ca5

Please sign in to comment.