From 4bc4ca50a6be23ff3b7b6f42c59a120617d76584 Mon Sep 17 00:00:00 2001 From: pichetp Date: Sat, 6 Oct 2007 20:51:28 +0000 Subject: [PATCH] checking that there remain $oldwrappedids before deleting them lines 87-.. add if(is_array($oldwrappedids) && count($oldwrappedids)){ --- question/type/multianswer/questiontype.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.39.5