-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Bug fix for relative directory removal #2055
Conversation
UnitTest: https://gist.github.com/4221865 time php UnitTest-e8af5d1.php
|
This fixes two bugs: - for segments that ends with ".." e.g. /user/username../details, this should not be replaced - current solution only replace double slashes, this solutions removes the infinite number of recurring slashes
Nice! However, in order to get this into CI, some adjustments need to be made in order to meet the styleguide requiremens. I'll comment on the diff. Edit: Also, if this fixes a bug - it should be noted in the changelog. |
|
||
/** | ||
* Remove relative directory (../) and multi slashes (///) | ||
* @param string $url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use only tabs as separators - no spaces (between 'string' and '$url' + although followed by a tab, you have spaces after both @param
and @return
).
Additionally, for the sake of consistency there should be an empty description line between 228 & 229.
Bug fix for relative directory removal
@narfbg I realized there's another snippet that also shares the same code |
That's fast! :p |
Bug fix for relative directory removal
This patch attempts to fix two bugs: