// Avoid exception if amount is null on addind an orderpayment
This commit is contained in:
@@ -805,7 +805,7 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
|
|
||||||
if (!Validate::isLoadedObject($order))
|
if (!Validate::isLoadedObject($order))
|
||||||
$this->errors[] = Tools::displayError('The order cannot be found');
|
$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.');
|
$this->errors[] = Tools::displayError('The amount is invalid.');
|
||||||
elseif (!Validate::isString(Tools::getValue('payment_method')))
|
elseif (!Validate::isString(Tools::getValue('payment_method')))
|
||||||
$this->errors[] = Tools::displayError('The selected payment method is invalid.');
|
$this->errors[] = Tools::displayError('The selected payment method is invalid.');
|
||||||
|
|||||||
Reference in New Issue
Block a user