From f8d128b33fa9b8d6d1c40f5a95a8e2d7d65537f9 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 18 Sep 2017 10:35:34 +0200 Subject: [PATCH] PropertyModifierArrayFilter: allow string values fixes #1186 --- .../Director/PropertyModifier/PropertyModifierArrayFilter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/Director/PropertyModifier/PropertyModifierArrayFilter.php b/library/Director/PropertyModifier/PropertyModifierArrayFilter.php index f9592771..0b52987e 100644 --- a/library/Director/PropertyModifier/PropertyModifierArrayFilter.php +++ b/library/Director/PropertyModifier/PropertyModifierArrayFilter.php @@ -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'