mirror of
https://github.com/getgrav/grav.git
synced 2026-03-02 02:21:29 +01:00
Fixed saving Flex configuration with ignored values becoming null
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
* Regression: Fixed fatal error in blueprints [#2811](https://github.com/getgrav/grav/issues/2811)
|
||||
* Regression: Fixed bad method call in FlexDirectory::getAuthorizeRule()
|
||||
* Regression: Fixed fatal error in admin if the site has custom permissions in `onAdminRegisterPermissions`
|
||||
* Grav 1.7: Fixed saving Flex configuration with ignored values becoming null
|
||||
|
||||
# v1.7.0-rc.5
|
||||
## 02/03/2020
|
||||
|
||||
@@ -191,6 +191,10 @@ class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface
|
||||
}
|
||||
|
||||
foreach ($data as $key => $field) {
|
||||
if (null === $field && !$missingValuesAsNull) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$val = $rules[$key] ?? $rules['*'] ?? null;
|
||||
$rule = \is_string($val) ? $this->items[$val] : $this->items[$parent . $key] ?? null;
|
||||
|
||||
|
||||
@@ -475,7 +475,7 @@ class FlexDirectoryForm implements FlexDirectoryFormInterface, \JsonSerializable
|
||||
protected function filterData($data = null): void
|
||||
{
|
||||
if ($data instanceof Data) {
|
||||
$data->filter(true, false);
|
||||
$data->filter(false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user