Skip to content

Add empty string as default value for $string property to avoid issue… #1

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
Nov 19, 2024

Conversation

andriusbaliutis
Copy link

@andriusbaliutis andriusbaliutis commented Nov 19, 2024

I added a default value of empty string to avoid null-related errors, while the $string property is not always initialized in the constructor.

This problem mainly occurs in PHP > 8, where it throws fatal errors in functions like strlen() or mb_strlen().

…s in PHP >=8 version for nullable parameters
@Bonscho Bonscho merged commit 85ca1ae into chroma-x:master Nov 19, 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.

3 participants