From bd7a74d79e16fcdaf6faf7174ce29d4308950c4f Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Mon, 6 Mar 2023 11:01:15 -0800 Subject: [PATCH] Coerce ignore validation to array to cover both array/non-array values --- system/src/Grav/Common/Data/BlueprintSchema.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Data/BlueprintSchema.php b/system/src/Grav/Common/Data/BlueprintSchema.php index 7b34c26a2..b47670605 100644 --- a/system/src/Grav/Common/Data/BlueprintSchema.php +++ b/system/src/Grav/Common/Data/BlueprintSchema.php @@ -129,7 +129,7 @@ class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface $items = $name !== '' ? $this->getProperty($name)['fields'] ?? [] : $this->items; foreach ($items as $key => $rules) { $type = $rules['type'] ?? ''; - $ignore = (bool) array_filter($rules['validate']['ignore'] ?? []) ?? false; + $ignore = (bool) array_filter((array)($rules['validate']['ignore'] ?? [])) ?? false; if (!str_starts_with($type, '_') && !str_contains($key, '*') && $ignore !== true) { $list[$prefix . $key] = null; }