This commit is contained in:
Etienne Roudeix
2013-09-11 08:37:18 +02:00
parent 0050d01278
commit 2f07e01b06

View File

@@ -79,6 +79,7 @@ class ProductSaleElements extends BaseLoop
* @param $pagination * @param $pagination
* *
* @return \Thelia\Core\Template\Element\LoopResult * @return \Thelia\Core\Template\Element\LoopResult
* @throws \InvalidArgumentException
*/ */
public function exec(&$pagination) public function exec(&$pagination)
{ {
@@ -112,7 +113,7 @@ class ProductSaleElements extends BaseLoop
} }
$currencyId = $this->getCurrency(); $currencyId = $this->getCurrency();
if (null !== $currency) { if (null !== $currencyId) {
$currency = CurrencyQuery::create()->findOneById($currencyId); $currency = CurrencyQuery::create()->findOneById($currencyId);
if (null === $currency) { if (null === $currency) {
throw new \InvalidArgumentException('Cannot found currency id: `' . $currency . '` in product_sale_elements loop'); throw new \InvalidArgumentException('Cannot found currency id: `' . $currency . '` in product_sale_elements loop');