From c4fffbd6f72ef4a6379a4cccf7eca072abdb6cf6 Mon Sep 17 00:00:00 2001 From: tschallacka Date: Fri, 9 Oct 2015 16:01:09 +0200 Subject: [PATCH] Fixed form field parsing to accept no config If a programmer would define a yaml like fields: shortcut: country: It would fail with message "array_key_exists() expects parameter 2 to be array, null given" on line 275 of ..\modules\backend\classes\FormField.php The yaml parsing returns a null. This check intercepts that null value being passed to the function and turns it into a proper array. --- modules/backend/classes/FormField.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/backend/classes/FormField.php b/modules/backend/classes/FormField.php index 4ef1aeac4..20d17eb3a 100644 --- a/modules/backend/classes/FormField.php +++ b/modules/backend/classes/FormField.php @@ -254,6 +254,10 @@ class FormField */ protected function evalConfig($config) { + if(is_null($config)) { + $config = []; + } + /* * Standard config:property values */