From de40e6b4a2bcf3a6cc7296b8c9042bdf4f189164 Mon Sep 17 00:00:00 2001 From: Oleksandr Zhyian Date: Thu, 30 May 2024 10:51:10 +0300 Subject: [PATCH] fix: add default campo keys value --- src/Application/DegreeProgramViewRaw.php | 2 +- src/Application/DegreeProgramViewTranslated.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Application/DegreeProgramViewRaw.php b/src/Application/DegreeProgramViewRaw.php index ba26531..8c7fad9 100644 --- a/src/Application/DegreeProgramViewRaw.php +++ b/src/Application/DegreeProgramViewRaw.php @@ -201,7 +201,7 @@ public static function fromArray(array $data): self ), applyNowLink: MultilingualLink::fromArray($data[DegreeProgram::APPLY_NOW_LINK]), entryText: MultilingualString::fromArray($data[DegreeProgram::ENTRY_TEXT]), - campoKeys: CampoKeys::fromArray($data[DegreeProgram::CAMPO_KEYS]), + campoKeys: CampoKeys::fromArray($data[DegreeProgram::CAMPO_KEYS] ?? []), ); } diff --git a/src/Application/DegreeProgramViewTranslated.php b/src/Application/DegreeProgramViewTranslated.php index 06503ae..e1d50cd 100644 --- a/src/Application/DegreeProgramViewTranslated.php +++ b/src/Application/DegreeProgramViewTranslated.php @@ -282,7 +282,7 @@ public static function fromArray(array $data): self studentInitiatives: Link::fromArray($data[DegreeProgram::STUDENT_INITIATIVES]), applyNowLink: Link::fromArray($data[DegreeProgram::APPLY_NOW_LINK]), entryText: $data[DegreeProgram::ENTRY_TEXT], - campoKeys: CampoKeys::fromArray($data[DegreeProgram::CAMPO_KEYS]), + campoKeys: CampoKeys::fromArray($data[DegreeProgram::CAMPO_KEYS] ?? []), ); if (empty($data[self::TRANSLATIONS])) {