Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected empty "query" property when returning CodeIgniter\HTTP\URI #2062

Closed
MohKari opened this issue Jun 19, 2019 · 0 comments · Fixed by #2063
Closed

Unexpected empty "query" property when returning CodeIgniter\HTTP\URI #2062

MohKari opened this issue Jun 19, 2019 · 0 comments · Fixed by #2063

Comments

@MohKari
Copy link
Contributor

MohKari commented Jun 19, 2019

Describe the bug
The class CodeIgniter\HTTP\URI "query" property is empty even when a query string is present in the url.

CodeIgniter 4 version
4.0.0-beta.2

Affected module(s)
CodeIgniter\HTTP\URI

Expected behavior
I expect the "query" value of CodeIgniter\HTTP\URI to be an associative array containing the query string information.

Steps to reproduce

  1. Add following logic to App\Controllers\Home.php
$request = \Config\Services::request();
var_dump($request);
  1. Navigate to home page and include a query string
  2. Look at the query property's value or the CodeIgniter\HTTP\URI

Work around
I'm able to get a specific query string value if i know the key by using

$request = \Config\Services::request();
$request->getGet("key");

Context

  • OS: Linux 916c85f98519 4.9.125-linuxkit
  • Apache/2.4.25 (Debian)
  • PHP Version 7.2.18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant