mirror of
https://github.com/getgrav/grav.git
synced 2026-07-07 07:22:59 +02:00
Fixed blueprint value filtering in lists [#2923]
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
* Changed `Folder::hasChildren` to `Folder::countChildren`
|
||||
1. [](#bugfix)
|
||||
* Fixed new `Flex Page` not having correct form fields for the page type
|
||||
* Fixed blueprint value filtering in lists [#2923](https://github.com/getgrav/grav/issues/2923)
|
||||
|
||||
# v1.7.0-rc.11
|
||||
## 05/14/2020
|
||||
|
||||
@@ -202,11 +202,14 @@ class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($rule && $rule['type'] !== '_parent') {
|
||||
$isParent = isset($val['*']);
|
||||
|
||||
if (!$isParent && $rule && $rule['type'] !== '_parent') {
|
||||
$field = Validation::filter($field, $rule);
|
||||
} elseif (\is_array($field) && \is_array($val)) {
|
||||
// Array has been defined in blueprints.
|
||||
$field = $this->filterArray($field, $val, $parent . $key . '.', $missingValuesAsNull, $keepEmptyValues);
|
||||
$k = $isParent ? '*' : $key;
|
||||
$field = $this->filterArray($field, $val, $parent . $k . '.', $missingValuesAsNull, $keepEmptyValues);
|
||||
|
||||
if (null === $field) {
|
||||
// Nested parent has no values.
|
||||
|
||||
Reference in New Issue
Block a user