mirror of
https://github.com/getgrav/grav.git
synced 2026-03-02 02:21:29 +01:00
Fixed Blueprint::filter() returning null instead of array if there is nothing to return
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
* Fixed `{{ false|string }}` twig to return '0' instead of ''
|
||||
* Fixed `Data::filter()` removing empty fields (such as empty list) by default
|
||||
* Fixed twig `url()` failing if stream has extra slash in it (e.g. `user:///data`)
|
||||
* Fixed `Blueprint::filter()` returning null instead of array if there is nothing to return
|
||||
* Grav 1.7: Fixed `Flex Pages` unserialize issues if Flex-Objects Plugin has not been installed
|
||||
* Grav 1.7: Require Flex-Objects Plugin to edit Flex Accounts
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ class Blueprint extends BlueprintForm
|
||||
{
|
||||
$this->initInternals();
|
||||
|
||||
return $this->blueprintSchema->filter($data, $missingValuesAsNull, $keepEmptyValues);
|
||||
return $this->blueprintSchema->filter($data, $missingValuesAsNull, $keepEmptyValues) ?? [];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface
|
||||
*/
|
||||
public function filter(array $data, $missingValuesAsNull = false, $keepEmptyValues = false)
|
||||
{
|
||||
return $this->filterArray($data, $this->nested, $missingValuesAsNull, $keepEmptyValues);
|
||||
return $this->filterArray($data, $this->nested, $missingValuesAsNull, $keepEmptyValues) ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user