Skip to content

Commit f7aea83

Browse files
committed
Properly initialize $totalAmounts
Otherwise getAllTotalAmounts() does not return an array if no totals have been added. Same goes for $baseTotalAmounts
1 parent 160327b commit f7aea83

File tree

1 file changed

+2
-2
lines changed
  • app/code/Magento/Quote/Model/Quote/Address

1 file changed

+2
-2
lines changed

app/code/Magento/Quote/Model/Quote/Address/Total.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ class Total extends \Magento\Framework\DataObject
1313
/**
1414
* @var array
1515
*/
16-
protected $totalAmounts;
16+
protected $totalAmounts = [];
1717

1818
/**
1919
* @var array
2020
*/
21-
protected $baseTotalAmounts;
21+
protected $baseTotalAmounts = [];
2222

2323
/**
2424
* Serializer interface instance.

0 commit comments

Comments
 (0)