You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: $this->request->getGetPost() is inconsistent with $this->request->getGet() #10361
Which operating systems have you tested for this bug?
Windows
Which server did you use?
cli-server (PHP built-in webserver)
Environment
development
Database
MySQL 8.4.9
What happened?
I receive values to a page which I need to parse into an array. I am using $this->request->getPost([ ... ]) to ensure that only the values I require are parsed. This works as expected.
I have an instance where the same page is called with values being passed via the query string so I use $this->request->getGet([ ... ]) to parse the query string.
I don't know whether the request is going to come via GET or POST so naturally I would like to use $this->request->getPostGet([ ... ]) however an error is thrown instead.
When I run $values = $this->request->getPostGet([ 'IPAddress' ]); I expected to get an array as I do with getGet() or getPost(), however an error is thrown instead:
TypeError
CodeIgniter\Superglobals::post(): Argument #1 ($key) must be of type string, array given, called in [Folder]\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php on line 604
The same happens if I call $this->request->getGetPost([ ... ])
A useful next step might be to separate the repro into input, state/cache update, and final output for $this->request->getPost([ ... ]). That would make it clearer whether “$this->request->getGetPost() is inconsistent with $this->request->getGet()” is failing during parsing/configuration, during internal state updates, or only at the user-visible result.
Activity
hiSandog commentedon Jul 5, 2026
A useful next step might be to separate the repro into input, state/cache update, and final output for
$this->request->getPost([ ... ]). That would make it clearer whether “$this->request->getGetPost() is inconsistent with $this->request->getGet()” is failing during parsing/configuration, during internal state updates, or only at the user-visible result.