From b5471d8801a7eb51375991663edf1552d15e80a3 Mon Sep 17 00:00:00 2001 From: Alexander Killing Date: Tue, 23 Apr 2024 13:22:40 +0200 Subject: [PATCH] 40270: Administration -> Delete trash -> Delete Surveys => error: urveyCategories::addCategory(): Argument #1 () must be o --- .../SurveyQuestionPool/Questions/class.SurveyMatrixQuestion.php | 2 +- .../Questions/class.SurveyMultipleChoiceQuestion.php | 2 +- .../Questions/class.SurveySingleChoiceQuestion.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/SurveyQuestionPool/Questions/class.SurveyMatrixQuestion.php b/Modules/SurveyQuestionPool/Questions/class.SurveyMatrixQuestion.php index 4c1a525d2277..ae6bfe86edcf 100755 --- a/Modules/SurveyQuestionPool/Questions/class.SurveyMatrixQuestion.php +++ b/Modules/SurveyQuestionPool/Questions/class.SurveyMatrixQuestion.php @@ -285,7 +285,7 @@ public function loadFromDb(int $question_id): void ); if ($result->numRows() > 0) { while ($data = $ilDB->fetchAssoc($result)) { - $this->columns->addCategory($data["title"], (int) $data["other"], (int) $data["neutral"], null, ($data['scale']) ?: ($data['sequence'] + 1)); + $this->columns->addCategory((string) $data["title"], (int) $data["other"], (int) $data["neutral"], null, ($data['scale']) ?: ($data['sequence'] + 1)); } } diff --git a/Modules/SurveyQuestionPool/Questions/class.SurveyMultipleChoiceQuestion.php b/Modules/SurveyQuestionPool/Questions/class.SurveyMultipleChoiceQuestion.php index b1959352231f..113b77d43a0f 100755 --- a/Modules/SurveyQuestionPool/Questions/class.SurveyMultipleChoiceQuestion.php +++ b/Modules/SurveyQuestionPool/Questions/class.SurveyMultipleChoiceQuestion.php @@ -95,7 +95,7 @@ public function loadFromDb(int $question_id): void ); if ($result->numRows() > 0) { while ($data = $ilDB->fetchAssoc($result)) { - $this->categories->addCategory($data["title"], $data["other"], $data["neutral"], null, ($data['scale']) ?: ($data['sequence'] + 1)); + $this->categories->addCategory((string) $data["title"], (int) $data["other"], (int) $data["neutral"], null, ($data['scale']) ?: ($data['sequence'] + 1)); } } } diff --git a/Modules/SurveyQuestionPool/Questions/class.SurveySingleChoiceQuestion.php b/Modules/SurveyQuestionPool/Questions/class.SurveySingleChoiceQuestion.php index 2f0becb87c06..fd41936a79fe 100755 --- a/Modules/SurveyQuestionPool/Questions/class.SurveySingleChoiceQuestion.php +++ b/Modules/SurveyQuestionPool/Questions/class.SurveySingleChoiceQuestion.php @@ -140,7 +140,7 @@ public function loadFromDb(int $question_id): void ); if ($result->numRows() > 0) { while ($data = $ilDB->fetchAssoc($result)) { - $this->categories->addCategory($data["title"], $data["other"], $data["neutral"], null, ($data['scale']) ?: ($data['sequence'] + 1)); + $this->categories->addCategory((string) $data["title"], (int) $data["other"], (int) $data["neutral"], null, ($data['scale']) ?: ($data['sequence'] + 1)); } } }