# Patch for Bug #51344: FILTER_NULL_ON_FAILURE flag automatically set in filter_input() functions.

- Thread: https://externals.io/message/48010
- Original archive: https://news-web.php.net/php.internals/48010
- Started by Mats Lindh on 2010-04-19T16:18:03+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #48010 — Mats Lindh — 2010-04-19T16:18:03+00:00

URL: https://externals.io/message/48010#48010

Hi,

The filter_input function has an errornous check for the
 `FILTER_NULL_ON_FAILURE` flag, where it returns `NULL` if it is NOT set,
and not if it is set.

I added the patch to the bug tracker over a week ago, but it seems
like it has gone unnoticed:

http://bugs.php.net/bug.php?id=51344

Would be great if someone could take a quick look and apply the patch
if it looks good. Test is also included in the patch.

--mats

---

## #48013 — Adam Harvey — 2010-04-20T00:51:27+00:00

URL: https://externals.io/message/48010#48013 · In reply to: #48010

Hi Mats,


> The filter_input function has an errornous check for the
> `FILTER_NULL_ON_FAILURE` flag, where it returns `NULL` if it is NOT set,
> and not if it is set.
>
> I added the patch to the bug tracker over a week ago, but it seems
> like it has gone unnoticed:
>
> http://bugs.php.net/bug.php?id=51344
>
> Would be great if someone could take a quick look and apply the patch
> if it looks good. Test is also included in the patch.

Sorry about that: I do remember seeing the patch last weekend and
completely forgot about it by the time I was in front of a development
box. I'll have a look at it today.

Thanks for the heads up!

Adam
