Skip to content

scope Matomo PHP tracker packaged with embedded Matomo #1351

@scrobbleme

Description

@scrobbleme

We are using Matomo for WordPress and a custom trackings based on https://github.com/matomo-org/matomo-php-tracker

The latest version of the PHP tracker (3.4.0) introduced Strict types for arguments and return types
Unfortunately this breaks compatibility... (autoloader probably picks our lib version first)

Declaration of WpMatomo\AjaxTracker::sendRequest($url, $method = 'GET', $data = null, $force = false) 
must be compatible with 
MatomoTracker::sendRequest(string $url, string $method = 'GET', $data = null, bool $force = false): string 
in /wp-content/plugins/_matomo/classes/WpMatomo/AjaxTracker.php on line 107

Solution

Add types as well, which generally is good and also should be compatible with versions < 3.4.0 without types

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions