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

PHP8.1 compatibility fixes in referrers plugin #19127

Closed
MichaelRoosz opened this issue Apr 21, 2022 · 2 comments · Fixed by #19135
Closed

PHP8.1 compatibility fixes in referrers plugin #19127

MichaelRoosz opened this issue Apr 21, 2022 · 2 comments · Fixed by #19135
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@MichaelRoosz
Copy link
Contributor

MichaelRoosz commented Apr 21, 2022

With Matomo 4.9.0, I see lots of these warnings:

1.

WARNING Referrers
plugins/Referrers/Columns/Base.php(525): 
Deprecated - mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated

2.

WARNING Referrers
plugins/Referrers/Columns/Base.php(478): 
Deprecated - urldecode(): Passing null to parameter #1 ($string) of type string is deprecated

Problem 1 I solved temporarily by replacing
$this->keywordReferrerAnalyzed = mb_strtolower($this->keywordReferrerAnalyzed);
with
$this->keywordReferrerAnalyzed = mb_strtolower($this->keywordReferrerAnalyzed ?? '');

But I am not sure this is the best fix.

@MichaelRoosz MichaelRoosz added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Apr 21, 2022
@MichaelRoosz MichaelRoosz changed the title PHP 8.1 warnings in plugin Referrer (Matomo 4.9.0) PHP 8.1 warnings in plugin Referrers(Matomo 4.9.0) Apr 21, 2022
@MichaelRoosz MichaelRoosz changed the title PHP 8.1 warnings in plugin Referrers(Matomo 4.9.0) PHP 8.1 warnings in plugin Referrers (Matomo 4.9.0) Apr 21, 2022
@justinvelluppillai justinvelluppillai added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Apr 21, 2022
@justinvelluppillai
Copy link
Contributor

Hi @MichaelRoosz - that fix looks fine to me, it'd be great if you could make a Pull Request for that. The other warning would be a similar fix to the same file.

@MichaelRoosz
Copy link
Contributor Author

Hello @justinvelluppillai , here is a pr: #19135

@sgiehl sgiehl linked a pull request Apr 25, 2022 that will close this issue
@sgiehl sgiehl added this to the 4.10.0 milestone Apr 25, 2022
@justinvelluppillai justinvelluppillai changed the title PHP 8.1 warnings in plugin Referrers (Matomo 4.9.0) PHP8.1 compatibility fixes in referrers plugin May 9, 2022
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants