// Avoid exception if amount is null on addind an orderpayment

This commit is contained in:
Rémi Gaillard
2013-09-18 14:29:01 +02:00
parent 672da852c5
commit 66f46eee03
+1 -1
View File
@@ -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.');