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

Fix Windows routing with built-in server #1502

Merged
merged 1 commit into from
Jun 4, 2017
Merged

Fix Windows routing with built-in server #1502

merged 1 commit into from
Jun 4, 2017

Conversation

OleVik
Copy link
Contributor

@OleVik OleVik commented May 30, 2017

Strip backward-slashes from Medium.php's and ImageMedium.php's url() method, both ahead of and trailing the string. As this uses trim() and backward-slashes it should be safe across systems, because only Windows actually relies on them even though PHP will allow either forward- or backward-slashes in paths.

This solves Admin 1119. Tested with PHP PHP 7.0.7 and Grav from current source, on Windows 10 x64, using php -S localhost:80 -t "C:\Users\Ole Vik\Downloads\Grav\develop" system/router.php to run the server.

Strips backward-slashes from Medium.php's and ImageMedium.php's url() method.
Copy link
Contributor

@flaviocopes flaviocopes left a comment

Choose a reason for hiding this comment

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

Tested on OSX

@rhukster rhukster merged commit ff8a8dd into getgrav:develop Jun 4, 2017
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 this pull request may close these issues.

3 participants