Skip to content

[DomCrawler] Don't pass null to trim() #42768

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
Aug 28, 2021

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Aug 28, 2021

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Part of #41552
License MIT
Doc PR N/A

PHP 8.1 triggers a deprecation warning if we pass null to trim().

A failing test of the FrameworkBundle test suite on the 5.3 branch uncovered that DomCrawler's CrawlerSelectorAttributeValueSame might do this if an attribute is queried that does not exist on a matched element. This PR adds a test case for that and fixes the behavior.

Signed-off-by: Alexander M. Turek <me@derrabus.de>
@Tobion
Copy link
Contributor

Tobion commented Aug 28, 2021

Thank you @derrabus.

@Tobion Tobion merged commit 1a59dc5 into symfony:4.4 Aug 28, 2021
@derrabus derrabus deleted the bugfix/dom-crawler-trim-null branch August 28, 2021 20:56
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.

3 participants