[-] FO : Fix Exception when invoice address is empty in OPC
This commit is contained in:
@@ -215,6 +215,19 @@ class AddressControllerCore extends FrontController
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->ajax && Tools::getValue('type') == 'invoice' && Configuration::get('PS_ORDER_PROCESS_TYPE'))
|
||||
{
|
||||
$this->errors = array_unique(array_merge($this->errors, $address->validateController()));
|
||||
if (count($this->errors))
|
||||
{
|
||||
$return = array(
|
||||
'hasError' => (bool)$this->errors,
|
||||
'errors' => $this->errors
|
||||
);
|
||||
die(Tools::jsonEncode($return));
|
||||
}
|
||||
}
|
||||
|
||||
// Save address
|
||||
if ($result = $address->save())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user