PropertyModifierArrayFilter: allow string values

fixes #1186
This commit is contained in:
Thomas Gelf 2017-09-18 10:35:34 +02:00
parent e950bb3395
commit f8d128b33f
1 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,10 @@ class PropertyModifierArrayFilter extends PropertyModifierHook
return $this->emptyValue();
}
if (is_string($value)) {
$value = [$value];
}
if (! is_array($value)) {
throw new InvalidPropertyException(
'The ArrayFilter property modifier be applied to arrays only'