diff --git a/Modules/CmiXapi/classes/class.ilCmiXapiResult.php b/Modules/CmiXapi/classes/class.ilCmiXapiResult.php index 56cc6e29736e..01718b877028 100644 --- a/Modules/CmiXapi/classes/class.ilCmiXapiResult.php +++ b/Modules/CmiXapi/classes/class.ilCmiXapiResult.php @@ -224,13 +224,12 @@ public static function getResultsForObject(int $objId): array $results = []; - if ($row = $DIC->database()->fetchAssoc($res)) { + while ($row = $DIC->database()->fetchAssoc($res)) { $result = new self(); $result->assignFromDbRow($row); $results[$result->getUsrId()] = $result; } - return $results; } }