-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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 protocol-relative URLs in Url::to()
(#13156)
#13157
Conversation
if ( | ||
substr($url, 0, 2) !== '//' | ||
&& (($pos = strpos($url, ':')) === false || !ctype_alpha(substr($url, 0, $pos))) | ||
) { |
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.
Any idea why we're not using static::isRelative()
here?
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.
Because isRelative()
method was added after this line. You can use it
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.
Done.
if ( | ||
substr($url, 0, 2) !== '//' | ||
&& (($pos = strpos($url, ':')) === false || !ctype_alpha(substr($url, 0, $pos))) | ||
) { |
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.
Because isRelative()
method was added after this line. You can use it
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.
Please add changelog.
Thank you!~ |
Fix #13156.