Skip to content

[DomCrawler] Avoid passing null to substr/strrpos methods #49983

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

Merged
merged 1 commit into from
Apr 9, 2023

Conversation

VincentLanglet
Copy link
Contributor

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #49960
License MIT
Doc PR symfony/symfony-docs#...

When calling resolve('foo', 'http://localhost?bar=1') two php deprecations were triggered.
This is because parse_url returns null and then we use the result as a string.

I made the code working the same for resolve('foo', 'http://localhost?bar=1') than for resolve('/foo', 'http://localhost?bar=1') (which was already tested and was not triggering the deprecation).

@fabpot
Copy link
Member

fabpot commented Apr 9, 2023

Thank you @VincentLanglet.

@fabpot fabpot merged commit e27a5a7 into symfony:5.4 Apr 9, 2023
@fabpot fabpot mentioned this pull request Apr 13, 2023
@fabpot fabpot mentioned this pull request Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants