From 738018ed637da8f30250fe284cf66bd3ce6ef99e Mon Sep 17 00:00:00 2001 From: Philippe Lonchampt Date: Fri, 9 Feb 2018 14:20:02 +0100 Subject: [PATCH] Fix for php 7.2 --- resources/views/cms/partials/formFieldsRow.blade.php | 2 +- src/Dvlpp/Sharp/Form/Fields/ListField.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/cms/partials/formFieldsRow.blade.php b/resources/views/cms/partials/formFieldsRow.blade.php index 21b02cb..b67e5c6 100644 --- a/resources/views/cms/partials/formFieldsRow.blade.php +++ b/resources/views/cms/partials/formFieldsRow.blade.php @@ -6,7 +6,7 @@ if(strpos($field, ":")) { list($field, $size) = explode(":", $field); } else { - $size = 12/sizeof($fields); + $size = 12/sizeof((array)$fields); } ?> diff --git a/src/Dvlpp/Sharp/Form/Fields/ListField.php b/src/Dvlpp/Sharp/Form/Fields/ListField.php index bca230c..e667b51 100644 --- a/src/Dvlpp/Sharp/Form/Fields/ListField.php +++ b/src/Dvlpp/Sharp/Form/Fields/ListField.php @@ -123,7 +123,7 @@ protected function createItemField($item) if(strpos($itemFieldKey, ":")) { list($itemFieldKey, $size) = explode(":", $itemFieldKey); } else { - $size = 12/sizeof($itemFields); + $size = 12/sizeof((array)$itemFields); } $itemField = $this->field->findItemField($itemFieldKey);