diff --git a/core/DataTable/Row.php b/core/DataTable/Row.php index a90855a1d97f9b5a2ba107c8353fd4188e172d3c..c6c0d21e9f5041c814bab9539f62a24294d81f60 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() + ); + } + } + }