// Fix PSCFV-3976

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17269 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard committed 2012-09-10 14:06:51 +00:00
1 parent 96104ecbf5
commit 265afeefca
1 file changed
+3 -2
+3 -2
View File
@@ -126,7 +126,8 @@ class AddressControllerCore extends FrontController
// Check phone // Check phone
if (!Tools::getValue('phone') && !Tools::getValue('phone_mobile')) if (!Tools::getValue('phone') && !Tools::getValue('phone_mobile'))
$this->errors[] = Tools::displayError('You must register at least one phone number'); $this->errors[] = Tools::displayError('You must register at least one phone number');
if ($address->id_country)
{
// Check country // Check country
if (!($country = new Country($address->id_country)) || !Validate::isLoadedObject($country)) if (!($country = new Country($address->id_country)) || !Validate::isLoadedObject($country))
throw new PrestaShopException('Country cannot be loaded with address->id_country'); throw new PrestaShopException('Country cannot be loaded with address->id_country');
@@ -169,7 +170,7 @@ class AddressControllerCore extends FrontController
$this->errors[] = Tools::displayError('Identification number is incorrect or has already been used.'); $this->errors[] = Tools::displayError('Identification number is incorrect or has already been used.');
else if (!$country->isNeedDni()) else if (!$country->isNeedDni())
$address->dni = null; $address->dni = null;
}
// Check if the alias exists // Check if the alias exists
if (!empty($_POST['alias']) if (!empty($_POST['alias'])
&& (int)$this->context->customer->id > 0 && (int)$this->context->customer->id > 0