Skip to content

Bug: When the $index parameter of getGetPost or getPostGet is null, you will get an error result #2839

Description

@Hermit-xx

CodeIgniter 4 version :4.0.2

When the $index parameter of getGetPost is null(e.g:$data = $request->getGetPost();), I Can't get any Get data,but can get ALL Post Data.

Similarly , when $index parameter of getPostGet is null , I Can't get any POST data,but can get ALL GET Data.

I think when I use getGetPost with $index parameter is null , it should get ALL Get Data, isn't it?

I think the problem should be here:
/system/HTTP/IncomingRequest.php : 430
return isset($_POST[$index]) ? $this->getPost($index, $filter, $flags) : $this->getGet($index, $filter, $flags);
/system/HTTP/IncomingRequest.php : 449
return isset($_GET[$index]) ? $this->getGet($index, $filter, $flags) : $this->getPost($index, $filter, $flags);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions