diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-11-11 13:43:05 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-11-11 13:43:05 +0300 |
commit | 7954d4c4a719bb1e9f929efdf398cb30382c7e89 (patch) | |
tree | 7fb563eb7c34fc1889248aac3d95f63579bbb481 | |
parent | 7617ea31833232cdf2cd39b55273514b8d859ef6 (diff) |
when there's a fire, pour a lot of water over it!! fixes #6485
-rw-r--r-- | core/DataTable/Row.php | 17 |
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() + ); + } + } + } |