Skip to content

Commit d651596

Browse files
authored
[fix] Avoid warning
1 parent d4a7a99 commit d651596

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BuilderAbstract.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public function fixTotals($order)
221221
$items = array();
222222
$amended = false;
223223
foreach ($order['cart']['items'] as $item) {
224-
if ('discount' == $item['type']) {
224+
if (isset($item['type']) && 'discount' == $item['type']) {
225225
$item['total_without_tax'] += $diff_without_tax;
226226
$item['total_with_tax'] += $diff_with_tax;
227227
$item['name'] .= ('' == $item['name'] ? '' : ' + ') . 'ajuste por redondeos';
@@ -313,4 +313,4 @@ public function items()
313313
// TODO: find out were this method was copied from so that we can see when it is updated.
314314

315315
public abstract function handlingItems();
316-
}
316+
}

0 commit comments

Comments
 (0)