Skip to content

Drop array custom-variable name from tracking fixture for matomo-php-tracker 3.4.0 - #137

Open
sgiehl wants to merge 2 commits into
prepare6xfrom
tracker-34-typehints
Open

Drop array custom-variable name from tracking fixture for matomo-php-tracker 3.4.0#137
sgiehl wants to merge 2 commits into
prepare6xfrom
tracker-34-typehints

Conversation

@sgiehl

@sgiehl sgiehl commented Jul 24, 2026

Copy link
Copy Markdown
Member

matomo-php-tracker 3.4.0 types setCustomVariable()'s $name parameter as string. The tracking fixture deliberately passed an array name for an out-of-range custom-variable id (6), which now raises a TypeError.

Since id 6 is already out of the valid range and not tracked, the string variant on the preceding line keeps the same coverage and the processed/expected output is unchanged.

Part of the Matomo 6 preparation (core bumps matomo-php-tracker to ~3.4.0).

Review

  • Functional review
  • Code review

matomo-php-tracker 3.4.0 types setCustomVariable()'s $name as string, so
the deliberately-invalid array name now raises a TypeError. The id (6) is
already out of the valid range and not tracked, so the string variant on
the line above keeps the same coverage and the expected output is unchanged.
The invalid (array) custom-variable name can no longer be passed through the
type-safe setCustomVariable(); inject it directly into the public
visitorCustomVar payload so the fixture still verifies a malformed cvar is
not tracked. Cannot use a raw _cvar param (custom param / debug append)
because it would duplicate and override the valid cvars in the request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant