Skip to content

Request()->query strips away query parameters if they are part of the query parameter #26224

@codegeek1001

Description

@codegeek1001
  • Laravel Version: 5.6
  • PHP Version: 7.2
  • Database Driver & Version: MySQL 5.7

Description:

I have a URL passed in a "next" variable in request query. The URL has its own query parameters. However, request()->query('next') strips away the query parameters starting with '&'

FULL URL: http://example.com/my-page?next=http://example.com/some-other-page?id=10&cat=123

But request()->query(‘next’) = http://example.com/some-other-page?id=10 which is wrong
as it has stripped away the remaining query parameters.

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