You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
parse_url() return false on absolute path containing : and no query string.
The following code:
<?phpvar_dump(parse_url('/page:1?foo=bar')); // Working example of parsing.var_dump(parse_url('/page:1'));
var_dump(parse_url('/page:1', \PHP_URL_SCHEME));
We should still fix this case IMHO. The engine currently fails to parse valid URLs.
I implemented a workaround in symfony/symfony#58218 but this is not pretty :)
This PR was merged into the 5.4 branch.
Discussion
----------
Work around `parse_url()` bug
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix#52579, #54332
| License | MIT
Works around
* php/php-src#12703
Commits
-------
fb76e53 Work around parse_url() bug
Description
parse_url()
returnfalse
on absolute path containing:
and no query string.The following code:
Resulted in this output:
But I expected this output instead:
This issue is opened following discussion on Symfony DomCrawler: symfony/symfony#52628
PHP Version
8.1.12
Operating System
No response
The text was updated successfully, but these errors were encountered: