From da5e5430a17423635c9e389f3a8ce71917008195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Proch=C3=A1zka?= Date: Sat, 8 Apr 2023 21:42:05 +0200 Subject: [PATCH] Account for empty http data for gettign reference --- src/AbstractRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AbstractRepository.php b/src/AbstractRepository.php index 6891174..c761279 100644 --- a/src/AbstractRepository.php +++ b/src/AbstractRepository.php @@ -207,7 +207,7 @@ public function getFormReference(string $field, Form $form): mixed return $this->getReference($data); } - return Arrays::walk($data, fn($id) => yield $id => $this->getReference($id)); + return Arrays::walk($data ?? [], fn($id) => yield $id => $this->getReference($id)); }