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 PHP8.1 issue passing NULL to sha1() #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smulvih2
Copy link

@smulvih2 smulvih2 commented Jan 6, 2023

After moving to PHP8.1 I am getting the following error when a field is empty:

Deprecated function: sha1(): Passing null to parameter #1 ($string) of type string is deprecated in DaveChild\TextStatistics\Text::cleanText() (line 34 of /var/www/vendor/davechild/textstatistics/src/DaveChild/TextStatistics/Text.php).

This PR checks if the string in question is NULL for proper handling.

mdio added a commit to mdio/Text-Statistics that referenced this pull request Nov 10, 2023
mdio added a commit to mdio/Text-Statistics that referenced this pull request Nov 10, 2023
Radcliffe pushed a commit to Radcliffe/Text-Statistics that referenced this pull request Dec 18, 2023
pattonwebz added a commit to equalizedigital/textstatistics that referenced this pull request Apr 2, 2024
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.

1 participant