CodeIgniter Forums
getGetPost and getPostGet method - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: getGetPost and getPostGet method (/showthread.php?tid=77454)



getGetPost and getPostGet method - YarbY - 09-03-2020

Hello
I built a web application with CI3 since 5 years. I'm trying to migrate on CI4.
Congratulations to all the team for this new version.
My application becomes large and the migration is not an easy work.

I used to use the input->getGetPost('my_field') method
I replace this by the new request->getGetPost('my_field')
I discover with suprise that if the field 'my_field' not exists the getGetPost method return all the GET parameters (request->getGet() ), the equivalent of $_GET.
the expected return for me, as the CI3 method, is NULL

I don't understand the reason of this change, can you give me explanation or examples ?
Thanks