diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-12-21 11:27:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-21 11:27:52 +0300 |
commit | 29dabc0f6d3069b01d85a6d0b7b5637c31bc181e (patch) | |
tree | debb3761bf19a30249ac851d840cacc776fc5441 /plugins/CoreVisualizations | |
parent | 338f67e5e2c1ea42253a6b54643c50ddb6fc660a (diff) |
Fixes more issues on PHP 8.1 (#18514)
* fixes deprecation warning in ui-test.php
/srv/matomo/config/environment/ui-test.php(53): Deprecated - str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
* fixes deprecation warning caused by SettingsPiwik.php
/srv/matomo/plugins/UsersManager/Controller.php(669): Deprecated - md5(): Passing null to parameter #1 ($string) of type string is deprecated
* Fixes deprecation warning in ComparisonRowGenerator.php
/srv/matomo/plugins/API/Filter/DataComparisonFilter/ComparisonRowGenerator.php(129): Deprecated - Automatic conversion of false to array is deprecated
* Fixes type error in Sparklines.php
Uncaught exception: TypeError: array_diff(): Argument #1 ($array) must be of type array, string given in /srv/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php:306
* Fixes some warnings in DisablePluginArchive fixture
/srv/matomo/tests/PHPUnit/Fixtures/DisablePluginArchive.php(59): Warning - Undefined property: Piwik\Tests\Fixtures\DisablePluginArchive::$useThirdPartyCookies
/srv/matomo/tests/PHPUnit/Fixtures/DisablePluginArchive.php(74): Warning - Undefined property: Piwik\Tests\Fixtures\DisablePluginArchive::$useSiteSearch
/srv/matomo/tests/PHPUnit/Fixtures/DisablePluginArchive.php(75): Warning - Undefined property: Piwik\Tests\Fixtures\DisablePluginArchive::$useSiteSearch
/srv/matomo/tests/PHPUnit/Fixtures/DisablePluginArchive.php(76): Warning - Undefined property: Piwik\Tests\Fixtures\DisablePluginArchive::$useSiteSearch
/srv/matomo/tests/PHPUnit/Fixtures/DisablePluginArchive.php(132): Warning - Undefined property: Piwik\Tests\Fixtures\DisablePluginArchive::$useSiteSearch
* Fixes undefined array key warningin SitesManager.php
/srv/matomo/plugins/SitesManager/SitesManager.php(376): Warning - Undefined array key unknown
Diffstat (limited to 'plugins/CoreVisualizations')
-rw-r--r-- | plugins/CoreVisualizations/Visualizations/Sparklines.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/CoreVisualizations/Visualizations/Sparklines.php b/plugins/CoreVisualizations/Visualizations/Sparklines.php index d4f471a6ae..ad9373f329 100644 --- a/plugins/CoreVisualizations/Visualizations/Sparklines.php +++ b/plugins/CoreVisualizations/Visualizations/Sparklines.php @@ -303,6 +303,10 @@ class Sparklines extends ViewDataTable return $columns; } + if (!is_array($columns)) { + $columns = [$columns]; + } + return array_diff($columns, ['nb_users', 'nb_uniq_visitors']); } } |