Skip to content

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

Description

@MohKari

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

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions