Skip to content

Fix undefined offset in Matomo PHP Tracker #16397

@tsteur

Description

@tsteur

( ! ) Notice: Undefined offset: 3 in vendor/piwik/piwik-php-tracker/PiwikTracker.php on line 1296

This is now happening in Matomo tracker because of https://github.com/matomo-org/matomo/pull/15774/files#diff-1279d666063b65e6d6777f902d11574fR3322-R3330

See https://github.com/matomo-org/matomo-php-tracker/blob/master/MatomoTracker.php#L1302-L1306

The cookie now has a lot less parts and different parts.

As part of this issue we need to

  • Assess if this breaks anything in PHP tracker (eg what happens if visitCount etc is no longer existing)
  • Adjust the PHP tracker code to understand both type of cookies (older visits would have old cookie structure vs some will have new cookie structure)
  • Mention in Matomo 4 developer changelog clearly that people need to upgrade their PHP tracker if they use it to not break anything

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.not-in-changelogFor issues or pull requests that should not be included in our release changelog on matomo.org.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions