Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAltamash Shaikh <altu9594@gmail.com>2022-06-03 04:20:59 +0300
committerGitHub <noreply@github.com>2022-06-03 04:20:59 +0300
commitc6dc54b5c027d7e87b4a6ed70ee647078687ae0d (patch)
treece8df53f4c257d5d5c0b483bcc407351040a306d
parent4d8f88dd36782e7af4bd014e71d57adb89636da7 (diff)
Fixed error due to non-array values (#19309)
* Fixed error due to non-array values * Updated check for single value and array values * formatting changes
-rw-r--r--plugins/Goals/DataTable/Filter/CalculateConversionPageRate.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Goals/DataTable/Filter/CalculateConversionPageRate.php b/plugins/Goals/DataTable/Filter/CalculateConversionPageRate.php
index fc4555df45..43b548559b 100644
--- a/plugins/Goals/DataTable/Filter/CalculateConversionPageRate.php
+++ b/plugins/Goals/DataTable/Filter/CalculateConversionPageRate.php
@@ -100,8 +100,10 @@ class CalculateConversionPageRate extends BaseFilter
foreach ($goalIds as $idGoal => $g) {
$total = $archive->getNumeric(GoalsArchiver::getRecordName('nb_conversions', $idGoal));
- if (count($total)) {
+ if (is_array($total) && count($total)) {
$goalTotals[$idGoal] = reset($total);
+ } else if (is_numeric($total)) {
+ $goalTotals[$idGoal] = $total;
}
}