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:
authormattab <matthieu.aubry@gmail.com>2014-04-10 04:15:02 +0400
committermattab <matthieu.aubry@gmail.com>2014-04-10 04:15:02 +0400
commitb1b7d4dc801a4d1b44411c691e3b62e5d7833704 (patch)
tree1d100ead81cbc0cd90a81ed5ae8833333f7b4b62 /core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php
parent755f5ccd489ac35bc57fc71b841423261f181b3b (diff)
If Divisor is empty, do not process the quotient
Diffstat (limited to 'core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php')
-rw-r--r--core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php b/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php
index ee7e243a2c..6c7eccdd7f 100644
--- a/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php
+++ b/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php
@@ -52,7 +52,7 @@ class ColumnCallbackAddColumnQuotient extends BaseFilter
* row iteration.
*/
public function __construct($table, $columnNameToAdd, $columnValueToRead, $divisorValueOrDivisorColumnName,
- $quotientPrecision = 0,$shouldSkipRows = false, $getDivisorFromSummaryRow = false)
+ $quotientPrecision = 0, $shouldSkipRows = false, $getDivisorFromSummaryRow = false)
{
parent::__construct($table);
$this->table = $table;
@@ -88,6 +88,9 @@ class ColumnCallbackAddColumnQuotient extends BaseFilter
}
$divisor = $this->getDivisor($row);
+ if ($divisor === false) {
+ continue;
+ }
$formattedValue = $this->formatValue($value, $divisor);
$row->addColumn($this->columnNameToAdd, $formattedValue);