Skip to content

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

Merged
sgiehl merged 2 commits into
prepare6xfrom
tracker-34-typehints
Jul 28, 2026
Merged

Drop array custom-variable name from tracking fixture for matomo-php-tracker 4.0#137
sgiehl merged 2 commits into
prepare6xfrom
tracker-34-typehints

Conversation

@sgiehl

@sgiehl sgiehl commented Jul 24, 2026

Copy link
Copy Markdown
Member

matomo-php-tracker 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 ~4.0).

Checklist

  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules

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.
@sgiehl sgiehl changed the title Drop array custom-variable name from tracking fixture for matomo-php-tracker 3.4.0 Drop array custom-variable name from tracking fixture for matomo-php-tracker 4.0 Jul 28, 2026
@sgiehl
sgiehl merged commit 6e9f7ac into prepare6x Jul 28, 2026
13 of 15 checks passed
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