From 66f46eee032247274297ee5c57df1e55ffd450e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Wed, 18 Sep 2013 14:29:01 +0200 Subject: [PATCH] // Avoid exception if amount is null on addind an orderpayment --- controllers/admin/AdminOrdersController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 66f3ad249..d15fd1323 100755 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -805,7 +805,7 @@ class AdminOrdersControllerCore extends AdminController if (!Validate::isLoadedObject($order)) $this->errors[] = Tools::displayError('The order cannot be found'); - elseif (!Validate::isNegativePrice($amount)) + elseif (!Validate::isNegativePrice($amount) || !(float)$amount) $this->errors[] = Tools::displayError('The amount is invalid.'); elseif (!Validate::isString(Tools::getValue('payment_method'))) $this->errors[] = Tools::displayError('The selected payment method is invalid.');