From ab2f3de4534dd63a55436503e383b2c30553ec55 Mon Sep 17 00:00:00 2001 From: Tobias Westfeld Date: Fri, 28 Jun 2019 12:02:10 +0200 Subject: [PATCH] #758: Cart applied_taxes of empty cart can be null --- app/code/Magento/QuoteGraphQl/Model/Resolver/CartPrices.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/QuoteGraphQl/Model/Resolver/CartPrices.php b/app/code/Magento/QuoteGraphQl/Model/Resolver/CartPrices.php index 48711ec38c4f8..22b59b060450c 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Resolver/CartPrices.php +++ b/app/code/Magento/QuoteGraphQl/Model/Resolver/CartPrices.php @@ -73,7 +73,7 @@ private function getAppliedTaxes(Total $total, string $currency): array $appliedTaxesData = []; $appliedTaxes = $total->getAppliedTaxes(); - if (count($appliedTaxes) === 0) { + if ($appliedTaxes === null || count($appliedTaxes) === 0) { return $appliedTaxesData; }