From: pichetp Date: Sat, 6 Oct 2007 20:51:28 +0000 (+0000) Subject: checking that there remain $oldwrappedids before deleting them lines 87-.. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4bc4ca50a6be23ff3b7b6f42c59a120617d76584;p=moodle.git checking that there remain $oldwrappedids before deleting them lines 87-.. add if(is_array($oldwrappedids) && count($oldwrappedids)){ --- diff --git a/question/type/multianswer/questiontype.php b/question/type/multianswer/questiontype.php index 7f3fe1fd0b..fc65b95c0a 100644 --- a/question/type/multianswer/questiontype.php +++ b/question/type/multianswer/questiontype.php @@ -84,8 +84,10 @@ class embedded_cloze_qtype extends default_questiontype { } // 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;