Skip to content
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 PHP error triggered by malformed HTML attributes #20

Merged

Conversation

rouliane
Copy link
Contributor

This PR fixes a PHP error that can occur when there is a malformed attribute in the HTML source (for example <p ""="">test</p>).

The error is the following :

Uncaught PHP Exception TypeError: "strtolower() expects parameter 1 to be string, null given" at vendor/mekras/php-speller/src/Source/Filter/HtmlFilter.php line 156

I was able to reproduce the error in the unit tests and fix it.

Thanks for this very useful library :)

@icanhazstring
Copy link
Collaborator

Thanks for the fix. Will tag it asap.

@icanhazstring icanhazstring merged commit f5f2f69 into mekras:master Apr 28, 2020
@rouliane rouliane deleted the fix-php-error-malformed-attribute branch April 28, 2020 18:34
@icanhazstring
Copy link
Collaborator

Tagged with 2.0.3. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants