Skip to content

Commit 1c8a5b8

Browse files
authored
Fixes passing null to str_contains (#4203)
1 parent 946f15a commit 1c8a5b8

File tree

1 file changed

+2
-2
lines changed
  • app/code/core/Mage/Adminhtml/Block/Report

1 file changed

+2
-2
lines changed

app/code/core/Mage/Adminhtml/Block/Report/Grid.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,10 @@ public function addGrandTotals($total)
409409
}
410410
}
411411
/*
412-
* recalc totals if we have average
412+
* recalculate totals if we have average
413413
*/
414414
foreach ($this->getColumns() as $key => $_column) {
415-
if (str_contains($_column->getTotal(), '/')) {
415+
if ($_column->hasTotal() && str_contains($_column->getTotal(), '/')) {
416416
list($t1, $t2) = explode('/', $_column->getTotal());
417417
if ($this->getGrandTotals()->getData($t2) != 0) {
418418
$this->getGrandTotals()->setData(

0 commit comments

Comments
 (0)