From 72e6ed76bf7b66a8f65cb265dd9d5e1e55b3448d Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Fri, 9 Jul 2021 21:30:35 +0200 Subject: [PATCH] Fixed an error when adding object and there are no Userfields (references https://github.com/grocy/grocy/commit/b0d38b87de07f4ae117dd7e8e437aac2e8d842b1) --- views/components/userfields_tbody.blade.php | 2 +- views/components/userfields_thead.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/components/userfields_tbody.blade.php b/views/components/userfields_tbody.blade.php index 5e9c7f04..354c9a94 100644 --- a/views/components/userfields_tbody.blade.php +++ b/views/components/userfields_tbody.blade.php @@ -1,4 +1,4 @@ -@if(count($userfields) > 0) +@if($userfields && count($userfields) > 0) @foreach($userfields as $userfield) diff --git a/views/components/userfields_thead.blade.php b/views/components/userfields_thead.blade.php index fe5a0c68..b7410f52 100644 --- a/views/components/userfields_thead.blade.php +++ b/views/components/userfields_thead.blade.php @@ -1,4 +1,4 @@ -@if(count($userfields) > 0) +@if($userfields && count($userfields) > 0) @foreach($userfields as $userfield)