diff options
author | Altamash Shaikh <altu9594@gmail.com> | 2022-06-03 04:20:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-03 04:20:59 +0300 |
commit | c6dc54b5c027d7e87b4a6ed70ee647078687ae0d (patch) | |
tree | ce8df53f4c257d5d5c0b483bcc407351040a306d /plugins | |
parent | 4d8f88dd36782e7af4bd014e71d57adb89636da7 (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
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Goals/DataTable/Filter/CalculateConversionPageRate.php | 4 |
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; } } |