Skip to content

[PHP 8.x compatibility] Fix possible deprecation warning in ProxyHttp class #21515

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 12, 2023

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Nov 10, 2023

Description:

Currently our tests are logging this error:

PHP Deprecated:  file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in /home/runner/work/matomo/matomo/matomo/core/ProxyHttp.php on line 71

This is caused by a test explicitly passing null to serverStaticFile.
Had a look through the code where the method serverStaticFile is being used and it seems like in rare conditions it could happen that false or null could be passed through, which the additional check should cover.

Review

@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review labels Nov 10, 2023
@sgiehl sgiehl added this to the 5.0.0 milestone Nov 10, 2023
@sgiehl sgiehl requested a review from a team November 10, 2023 10:20
@caddoo caddoo merged commit 5b66bda into 5.x-dev Nov 12, 2023
@caddoo caddoo deleted the fix83deprecation branch November 12, 2023 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review
Development

Successfully merging this pull request may close these issues.

2 participants