diff options
author | Tim-Hinnerk Heuer <tim@innocraft.com> | 2021-09-28 11:12:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-28 11:12:50 +0300 |
commit | 1bc9fdf55352b61c278d298e9935451394230355 (patch) | |
tree | bc2e264fb1bbdf93d6fb9d5c5dd650524afc6b8c /plugins/DevicePlugins | |
parent | 6130619db38b901dfb35f6aeeceedbe6b4e1e0c0 (diff) |
A few more PHP8.1 fixes (#17989)
* add return type declartions #17686
should not break anything and gets rid of a warning
* add return type to method signature #17686
* annotate return types to avoid warnings
* add more return types
* upgrade phpmailer/phpmailer to 6.5.1
* add return types, avoid deprecated null to string conversion
* fix some deprecation warnings for php 8.1 #17686
* fix in DbHelper::getInstallVersion() instead #17686
* ensure empty(DbHelper::getInstallVersion()) succeed #17686
* force return "0" string and adjust test
Co-authored-by: Justin Velluppillai <justin@innocraft.com>
Diffstat (limited to 'plugins/DevicePlugins')
-rw-r--r-- | plugins/DevicePlugins/API.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/DevicePlugins/API.php b/plugins/DevicePlugins/API.php index b767d5ade5..99109f72aa 100644 --- a/plugins/DevicePlugins/API.php +++ b/plugins/DevicePlugins/API.php @@ -86,6 +86,7 @@ class API extends \Piwik\Plugin\API $visitsSum = $visitsSumTotal - $ieVisits; $extraProcessedMetrics = $table->getMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME); + $extraProcessedMetrics = is_array($extraProcessedMetrics) ? $extraProcessedMetrics : []; $extraProcessedMetrics[] = new VisitsPercent($visitsSum); $table->setMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME, $extraProcessedMetrics); } |