Fixes Deprecated Warning in BasicIPInfoSerializer.php #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes Deprecated Warning in BasicIPInfoSerializer.php
Changes proposed in this pull request: This pull request addresses a deprecation warning related to the hash() function in BasicIPInfoSerializer.php (line 47). The warning occurs because null is being passed to the second parameter of hash(), which expects a string. To resolve this, I have explicitly cast the second parameter to a string.
Reviewers should focus on: Please review the changes to ensure that the casting of the second parameter in hash() does not introduce any unintended side effects. Also, verify if this resolves the deprecation warning as expected.
Screenshot: N/A
Confirmed:
[x] Frontend changes: Not applicable.
[x] Backend changes: Tests are green.
Required changes:
N/A
Base Error: Deprecated: hash(): Passing null to parameter #2 ($data) of type string is deprecated in /www/wwwroot/*/vendor/fof/geoip/src/Api/Serializer/BasicIPInfoSerializer.php on line 47