Skip to content

PHP8.1 compatibility fixes in referrers plugin #19127

@MichaelRoosz

Description

@MichaelRoosz

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.

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions