Skip to content

Bug: Request URI segment is out of range CI 4.0.3 #2949

Description

@desttools

Describe the bug
I have code in my app structured like this:
if ($request->uri->getSegment(2)){ ... }

It evaluates fine in 4.0.2 and earlier, but breaks in 4.0.3, throwing this error:

CodeIgniter\HTTP\Exceptions\HTTPException Request URI segment is our of range: 1

CodeIgniter 4 version
4.0.3 master

Affected module(s)
Which package or class is the bug in, if known.

Expected behavior, and steps to reproduce if appropriate
Previously this returned NULL. Maybe my code needs to be updated to restructure this conditional?

Context

  • ubuntu0.18.04.4
  • Apache/2.4.29 (Ubuntu)
  • PHP: 7.2.24-0

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions