From bb9e7b8d49ff86785cc39e77d76203d2b804715e Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Mon, 8 Oct 2018 16:47:40 -0400 Subject: [PATCH] Fix issue with cache settings --- src/Model/Settings.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Model/Settings.php b/src/Model/Settings.php index a295fd10..9b5490a7 100644 --- a/src/Model/Settings.php +++ b/src/Model/Settings.php @@ -144,11 +144,13 @@ final class Settings { 'type' => 'string', 'title' => 'Cache Port', 'description' => 'Port of the cache backend to connect to', + 'default' => NULL, ], 'password' => [ 'type' => 'string', 'title' => 'Cache Password', 'description' => 'Password to connect to cache backend', + 'default' => NULL, ], 'database' => [ 'type' => 'string', @@ -187,7 +189,8 @@ final class Settings { 'port' => [ 'type' => 'string', 'title' => 'Port', - 'description' => 'Database connection port' + 'description' => 'Database connection port', + 'default' => NULL, ], 'database' => [ 'type' => 'string', @@ -246,6 +249,12 @@ final class Settings { { foreach($value['fields'] as $k => $field) { + if (empty($values[$key][$k])) + { + unset($value['fields'][$k]); + continue; + } + $value['fields'][$k]['disabled'] = FALSE; $value['fields'][$k]['display'] = TRUE; $value['fields'][$k]['readonly'] = FALSE;