From fc16a287d9a6dee2ce6a52e7dd30c4ce7ef8573c Mon Sep 17 00:00:00 2001 From: Javier Date: Tue, 14 Jul 2020 14:54:00 +0200 Subject: [PATCH] Add is_countable method before calling count method --- src/RowGroup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RowGroup.php b/src/RowGroup.php index 0e9791e..31a7487 100644 --- a/src/RowGroup.php +++ b/src/RowGroup.php @@ -70,7 +70,7 @@ public function markup(FormBuilder $formBuilder) : string // See if there are any values in the old request $name = $this->name; $requestVals = old($name); - $requestGroupCloneCount = count($requestVals); + $requestGroupCloneCount = is_countable($requestVals) ? count($requestVals) : 0; // Decide if we need to loop over multiple times $rowGroupValueCounts = $formBuilder->getRowGroupValueCount($this->name);