History log of /php-src/ext/filter/tests/filter_callback_require_scalar.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# c2fb10d2 13-Sep-2023 Ilija Tovilo

Fix filter_var with callback and explicit REQUIRE_SCALAR

For some reason, FILTER_CALLBACK disables the FILTER_REQUIRE_SCALAR flag that is
normally set by default. While surprising, this

Fix filter_var with callback and explicit REQUIRE_SCALAR

For some reason, FILTER_CALLBACK disables the FILTER_REQUIRE_SCALAR flag that is
normally set by default. While surprising, this is not something we can change.

However, even specifying FILTER_REQUIRE_SCALAR explicitly does not corrently set
this flag. This is because FILTER_CALLBACK zeroes the flags after they have been
populated from the parameters.

We reverse the checks to make explicitly specifying the flag behave as expected.

Closes GH-12203

show more ...