Skip to content

Commit

Permalink
Fixes passing null to str_contains (#4203)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Sep 17, 2024
1 parent 946f15a commit 1c8a5b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/code/core/Mage/Adminhtml/Block/Report/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,10 @@ public function addGrandTotals($total)
}
}
/*
* recalc totals if we have average
* recalculate totals if we have average
*/
foreach ($this->getColumns() as $key => $_column) {
if (str_contains($_column->getTotal(), '/')) {
if ($_column->hasTotal() && str_contains($_column->getTotal(), '/')) {
list($t1, $t2) = explode('/', $_column->getTotal());
if ($this->getGrandTotals()->getData($t2) != 0) {
$this->getGrandTotals()->setData(
Expand Down

0 comments on commit 1c8a5b8

Please sign in to comment.