From 0227d32dff530cff70484efb195c4658f48c96b3 Mon Sep 17 00:00:00 2001 From: pichetp Date: Sat, 6 Oct 2007 21:10:13 +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 ee94ab7fde7..1738d4c922c 100644 --- a/question/type/multianswer/questiontype.php +++ b/question/type/multianswer/questiontype.php @@ -80,8 +80,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;