Should $request->getPost() and others modify data even when no filtering specified? |
I see. I think the problem is that we cannot just suddenly start passing back NULL as this could mess up other developers. You may be able to fix this in your application by passing FILTER_FLAG_EMPTY_STRING_NULL as an additional $flag:
https://3v4l.org/puPvf Note though that this also causes '' to return NULL, which may or may not be desirable for your use case. It is odd to me that filter_var with “unsafe raw” converts null values to strings but that’s on PHP, not CodeIgniter. |
Messages In This Thread |
Should $request->getPost() and others modify data even when no filtering specified? - by andre.tannus - 04-01-2021, 02:39 PM
RE: Should $request->getPost() and others modify data even when no filtering specified? - by MGatner - 04-08-2021, 07:23 AM
RE: Should $request->getPost() and others modify data even when no filtering specified? - by andre.tannus - 04-08-2021, 08:04 AM
RE: Should $request->getPost() and others modify data even when no filtering specified? - by MGatner - 04-09-2021, 04:26 AM
RE: Should $request->getPost() and others modify data even when no filtering specified? - by andre.tannus - 04-09-2021, 07:09 AM
RE: Should $request->getPost() and others modify data even when no filtering specified? - by MGatner - 04-10-2021, 05:33 AM
|