diff --git a/lib/internal/Magento/Framework/Exception/LocalizedException.php b/lib/internal/Magento/Framework/Exception/LocalizedException.php index 26fb5a216c51b..0b1d5f1998bfb 100644 --- a/lib/internal/Magento/Framework/Exception/LocalizedException.php +++ b/lib/internal/Magento/Framework/Exception/LocalizedException.php @@ -26,15 +26,14 @@ class LocalizedException extends \Exception protected $logMessage; /** - * Constructor - * * @param \Magento\Framework\Phrase $phrase * @param \Exception $cause + * @param int $code */ - public function __construct(Phrase $phrase, \Exception $cause = null) + public function __construct(Phrase $phrase, \Exception $cause = null, $code = 0) { $this->phrase = $phrase; - parent::__construct($phrase->render(), 0, $cause); + parent::__construct($phrase->render(), intval($code), $cause); } /**