Skip to content

Commit

Permalink
PR-742 Added check if discounts variable is an array
Browse files Browse the repository at this point in the history
Similiar to PR-678, fixes warnings in PHP >= 7.2

Related #742
  • Loading branch information
zoh48gz04 authored and Sieg committed Dec 13, 2019
1 parent a39e4f1 commit e4ac300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Application/Model/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ protected function _loadFromBasket(\OxidEsales\Eshop\Application\Model\Basket $o
if ($this->_blReloadDiscount) {
$dDiscount = 0;
$aDiscounts = $oBasket->getDiscounts();
if (count($aDiscounts) > 0) {
if (is_array($aDiscounts) && count($aDiscounts) > 0) {
foreach ($aDiscounts as $oDiscount) {
$dDiscount += $oDiscount->dDiscount;
}
Expand Down

0 comments on commit e4ac300

Please sign in to comment.