Skip to content

Commit

Permalink
Fixed special case [#1273]
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Jan 14, 2020
1 parent ea8b7b7 commit 7c0dcd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Data/BlueprintSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ protected function validateArray(array $data, array $rules, array $parent)
$messages += Validation::validate($child, $rule);
} elseif (\is_array($child) && \is_array($val)) {
// Array has been defined in blueprints.
$messages += $this->validateArray($child, $val, $rule);
$messages += $this->validateArray($child, $val, $rule ?? []);
} elseif (isset($parent['validation']) && $parent['validation'] === 'strict') {
// Undefined/extra item.
throw new \RuntimeException(sprintf('%s is not defined in blueprints', $key));
Expand Down

0 comments on commit 7c0dcd6

Please sign in to comment.