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

When generating URLs, only strip PATH_INFO when it is not empty #12500

Merged
merged 1 commit into from Jan 24, 2018

Conversation

mattab
Copy link
Member

@mattab mattab commented Jan 23, 2018

If PATH_INFO is defined, but empty, this line otherwise causes the URL to be rewritten incorrectly
As reported in #6644 (comment)

If PATH_INFO  is defined, but empty, this line otherwise causes the URL to be rewritten incorrectly
As reported in #6644 (comment)
@mattab mattab added this to the 3.3.1 milestone Jan 23, 2018
@PotcFdk
Copy link

PotcFdk commented Jan 24, 2018

LGTM

@@ -150,7 +150,7 @@ public static function getCurrentScriptName($removePathInfo = true)
}

// strip path_info
if ($removePathInfo && isset($_SERVER['PATH_INFO'])) {
if ($removePathInfo && !empty($_SERVER['PATH_INFO'])) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

@mattab mattab merged commit dcd3b04 into 3.x-dev Jan 24, 2018
@mattab mattab deleted the url_path_info branch January 24, 2018 21:48
@mattab mattab changed the title Only strip PATH_INFO when it is set to a value When generating URLs, only strip PATH_INFO when it is not empty Mar 27, 2018
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants