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.
This commit is contained in:
tschallacka 2015-10-09 16:01:09 +02:00
parent 1774f12e65
commit c4fffbd6f7
1 changed files with 4 additions and 0 deletions

View File

@ -254,6 +254,10 @@ class FormField
*/
protected function evalConfig($config)
{
if(is_null($config)) {
$config = [];
}
/*
* Standard config:property values
*/