tetsuo13 / Roundcube-Matomo-Tracking-Api-Plugin

Add Matomo (formerly Piwik) tracking server-side code to all requests in Roundcube
Other
1 stars 0 forks source link

Array and string offset access syntax with curly braces is deprecated #4

Open msebald opened 2 years ago

msebald commented 2 years ago

I am using Roundcube with PHP 7.4 and the code of the Piwik Tracking Api Plugin seems to be deprecated and the Roundcube error log is spammed. Could you please fix it?

PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in ......./plugins/piwik_tracking_api/PiwikTracker.php on line 449

tetsuo13 commented 2 years ago

I've upgraded the dependencies. Can you try the code in the repo at the most recent commit?

msebald commented 2 years ago

Yes I did. I think you forgot to rename a file inside the repo:

[05-Nov-2021 15:50:27 +0100]: PHP Error: Failed to load plugin file /var/www/mail.domain.tld/web/plugins/matomo_tracking_api/matomo_tracking_api.php in /var/www/mail.domain.tld/web/program/lib/Roundcube/rcube_plugin_api.php on line 193 (POST /?_task=mail&_action=refresh)

The name is not _matomo_trackingapi.php but still _piwik_trackingapi.php.

tetsuo13 commented 2 years ago

I'm not able to reproduce. Using Roundcube 1.5.0.

msebald commented 2 years ago

Hm. I re-downloaded the plugin as it has a new name now using composer. And it looks like there is a file named _piwik_trackingapi.php and not _matomo_trackingapi.php inside the new version.