-
-
Notifications
You must be signed in to change notification settings - Fork 439
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 issue with double port in error pages base URL #4518
Fix issue with double port in error pages base URL #4518
Conversation
We have polyfills for php8, you can use PS: please run |
Thanks for the feedback, i run CS fixer and changed the code to use |
|
@all-contributors add @massa-man code |
@massa-man already contributed before to code |
Thanks. |
Description (*)
This fixes an issue where the base URL injected into the error page HTML HEAD includes the port twice, and breaks the CSS and image imports. This happens because the code uses HTTP_HOST server variable that already includes the port if the browser URL has a port.
Manual testing scenarios (*)
http://localhost:8080
http://localhost:8080/errors/404.php
<head>
the<base>
element has a URL likehttp://localhost:8080:8080/errors/default/
Questions or comments
The code uses
substr_compare
instead ofstr_ends_with
for php 7 compatibility.Contribution checklist (*)