From 83f1f811d6de937c906138a4971a26126c09d4d1 Mon Sep 17 00:00:00 2001 From: Marvin Beym Date: Wed, 12 Aug 2026 10:26:35 +0200 Subject: [PATCH] Add type cast to fix issues with non string values passed as parameter --- .../class.ilSoapTestAdministration.php | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/components/ILIAS/soap/classes/class.ilSoapTestAdministration.php b/components/ILIAS/soap/classes/class.ilSoapTestAdministration.php index 9c85db781143..a7fedd11d897 100755 --- a/components/ILIAS/soap/classes/class.ilSoapTestAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapTestAdministration.php @@ -685,14 +685,14 @@ public function getTestResults(string $sid, int $test_ref_id, bool $sum_only) $titles = array_shift($data); foreach ($data as $row) { $xmlRow = new ilXMLResultSetRow(); - $xmlRow->setValue(0, $row["user_id"]); - $xmlRow->setValue(1, $row["login"]); - $xmlRow->setValue(2, $row["firstname"]); - $xmlRow->setValue(3, $row["lastname"]); - $xmlRow->setValue(4, $row["matriculation"]); - $xmlRow->setValue(5, $row["max_points"]); - $xmlRow->setValue(6, $row["reached_points"]); - $xmlRow->setValue(7, $row["passed"]); + $xmlRow->setValue(0, (string) $row["user_id"]); + $xmlRow->setValue(1, (string) $row["login"]); + $xmlRow->setValue(2, (string) $row["firstname"]); + $xmlRow->setValue(3, (string) $row["lastname"]); + $xmlRow->setValue(4, (string) $row["matriculation"]); + $xmlRow->setValue(5, (string) $row["max_points"]); + $xmlRow->setValue(6, (string) $row["reached_points"]); + $xmlRow->setValue(7, (string) $row["passed"]); $xmlResultSet->addRow($xmlRow); } } else { @@ -705,16 +705,16 @@ public function getTestResults(string $sid, int $test_ref_id, bool $sum_only) $xmlResultSet->addColumn("passed"); foreach ($data as $row) { $xmlRow = new ilXMLResultSetRow(); - $xmlRow->setValue(0, $row["user_id"]); - $xmlRow->setValue(1, $row["login"]); - $xmlRow->setValue(2, $row["firstname"]); - $xmlRow->setValue(3, $row["lastname"]); - $xmlRow->setValue(4, $row["matriculation"]); - $xmlRow->setValue(5, $row["question_id"]); - $xmlRow->setValue(6, $row["question_title"]); - $xmlRow->setValue(7, $row["max_points"]); - $xmlRow->setValue(8, $row["reached_points"]); - $xmlRow->setValue(9, $row["passed"]); + $xmlRow->setValue(0, (string) $row["user_id"]); + $xmlRow->setValue(1, (string) $row["login"]); + $xmlRow->setValue(2, (string) $row["firstname"]); + $xmlRow->setValue(3, (string) $row["lastname"]); + $xmlRow->setValue(4, (string) $row["matriculation"]); + $xmlRow->setValue(5, (string) $row["question_id"]); + $xmlRow->setValue(6, (string) $row["question_title"]); + $xmlRow->setValue(7, (string) $row["max_points"]); + $xmlRow->setValue(8, (string) $row["reached_points"]); + $xmlRow->setValue(9, (string) $row["passed"]); $xmlResultSet->addRow($xmlRow); } }