Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

checking that there remain $oldwrappedids before deleting them lines …

…87-..

add         if(is_array($oldwrappedids) && count($oldwrappedids)){
  • Loading branch information...
commit 26b131922b499a6ab3a5902d31c7ed6dad3e2339 1 parent f67882c
pichetp authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 question/type/multianswer/questiontype.php
View
6 question/type/multianswer/questiontype.php
@@ -80,8 +80,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;
Please sign in to comment.
Something went wrong with that request. Please try again.