From 74868442220e4074ae2f36807e81caa39d669f45 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Wed, 25 Sep 2013 18:02:06 +0200 Subject: [PATCH] [-] BO : Fix #PSCFV-10501 Remove fatal error --- classes/Currency.php | 5 +++-- classes/Product.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/Currency.php b/classes/Currency.php index bf9cca614..af07ba30d 100644 --- a/classes/Currency.php +++ b/classes/Currency.php @@ -188,8 +188,9 @@ class CurrencyCore extends ObjectModel 4 => array('left' => '', 'right' => &$formated_strings['right']), 5 => array('left' => '', 'right' => &$formated_strings['right']) ); - - return ($formats[$this->format][$side]); + if (isset($formats[$this->format][$side])) + return ($formats[$this->format][$side]); + return $this->sign; } /** diff --git a/classes/Product.php b/classes/Product.php index 5a8600fed..5c91ccb90 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -2509,7 +2509,7 @@ class ProductCore extends ObjectModel $id_state = 0; $zipcode = 0; - if (!$id_address) + if (!$id_address && Validate::isLoadedObject($cur_cart)) $id_address = $cur_cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}; if ($id_address)