diff --git a/ext/filter/CREDITS b/ext/filter/CREDITS
index 19cfe1d8db5..8d75401f779 100644
--- a/ext/filter/CREDITS
+++ b/ext/filter/CREDITS
@@ -1,2 +1,2 @@
Input Filter
-Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye
+Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye, Ilia Alshanetsky
diff --git a/ext/filter/filter.c b/ext/filter/filter.c
index 28a672060fa..9735c0962db 100644
--- a/ext/filter/filter.c
+++ b/ext/filter/filter.c
@@ -533,6 +533,10 @@ static void php_filter_call(zval **filtered, long filter, zval **filter_args, co
if (zend_hash_find(HASH_OF(*filter_args), "flags", sizeof("flags"), (void **)&option) == SUCCESS) {
convert_to_long(*option);
filter_flags = Z_LVAL_PP(option);
+
+ if (!(filter_flags & FILTER_REQUIRE_ARRAY || filter_flags & FILTER_FORCE_ARRAY)) {
+ filter_flags |= FILTER_REQUIRE_SCALAR;
+ }
}
if (zend_hash_find(HASH_OF(*filter_args), "options", sizeof("options"), (void **)&option) == SUCCESS) {
diff --git a/ext/filter/package.xml b/ext/filter/package.xml
index 28ad122a5b4..1c2c914c555 100644
--- a/ext/filter/package.xml
+++ b/ext/filter/package.xml
@@ -7,6 +7,12 @@
of filters and mechanisms that users can use to safely access their input data.
+
+ Ilia Alshanetsky
+ iliaa
+ iliaa@php.net
+ yes
+
Pierre-Alain Joye
pajoye