diff --git a/inc/question.class.php b/inc/question.class.php index 75647be38..ea9dea4d7 100644 --- a/inc/question.class.php +++ b/inc/question.class.php @@ -691,7 +691,15 @@ public function post_purgeItem() { 'id' => new QuerySubquery([ 'SELECT' => self::getForeignKeyField(), 'FROM' => $condition_table, - 'WHERE' => ['plugin_formcreator_questions_id' => $questionId] + 'WHERE' => [ + 'OR' => [ + [ + 'itemtype' => $this->getType(), + 'items_id' => $questionId + ], + 'plugin_formcreator_questions_id' => $questionId + ] + ] ]) ] );