diff --git a/Modules/Survey/classes/class.ilObjSurvey.php b/Modules/Survey/classes/class.ilObjSurvey.php index d173c3763b64..2c7ff7ff66e9 100755 --- a/Modules/Survey/classes/class.ilObjSurvey.php +++ b/Modules/Survey/classes/class.ilObjSurvey.php @@ -4684,13 +4684,13 @@ public function getAppraiseesToRate( */ public function getAnonymousIdByCode( string $a_code - ): int { + ): ?int { $ilDB = $this->db; $set = $ilDB->query("SELECT anonymous_id FROM svy_anonymous" . " WHERE survey_fi = " . $ilDB->quote($this->getSurveyId(), "integer") . " AND survey_key = " . $ilDB->quote($a_code, "text")); $res = $ilDB->fetchAssoc($set); - return $res["anonymous_id"]; + return $res["anonymous_id"] ?? null; } /**