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-11-11 13:43:05 +0300
committermattab <matthieu.aubry@gmail.com>2014-11-11 13:43:05 +0300
commit7954d4c4a719bb1e9f929efdf398cb30382c7e89 (patch)
tree7fb563eb7c34fc1889248aac3d95f63579bbb481 /core/DataTable
parent7617ea31833232cdf2cd39b55273514b8d859ef6 (diff)
when there's a fire, pour a lot of water over it!! fixes #6485
Diffstat (limited to 'core/DataTable')
-rw-r--r--core/DataTable/Row.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/core/DataTable/Row.php b/core/DataTable/Row.php
index a90855a1d9..c6c0d21e9f 100644
--- a/core/DataTable/Row.php
+++ b/core/DataTable/Row.php
@@ -640,10 +640,7 @@ class Row implements \ArrayAccess, \IteratorAggregate
return $newValue;
}
- if (is_string($columnToSumValue)) {
- throw new Exception("Trying to add two strings in DataTable\Row::sumRowArray: "
- . "'$thisColumnValue' + '$columnToSumValue'" . " for row " . $this->__toString());
- }
+ $this->warnWhenSummingTwoStrings($thisColumnValue, $columnToSumValue);
return 0;
}
@@ -761,4 +758,16 @@ class Row implements \ArrayAccess, \IteratorAggregate
}
}
+ protected function warnWhenSummingTwoStrings($thisColumnValue, $columnToSumValue)
+ {
+ if (is_string($columnToSumValue)) {
+ Log::warning(
+ "Trying to add two strings in DataTable\Row::sumRowArray: %s + %s for row %s",
+ $thisColumnValue,
+ $columnToSumValue,
+ $this->__toString()
+ );
+ }
+ }
+
}