Fix: Error report when no label provided

This commit is contained in:
Laurent Destailleur 2011-10-23 13:02:54 +02:00
parent 43bd6e1ea8
commit 76aa6607b6

View File

@ -154,7 +154,7 @@ if (empty($reshook))
if (! $_POST["name"])
{
$error++; $errors[]=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label"));
$_GET["action"] = $_POST["action"] = 'create';
$action = 'create';
}
if ($_POST["name"])
@ -163,7 +163,7 @@ if (empty($reshook))
if ($id <= 0)
{
$error++; $errors[]=($object->error?array($object->error):$object->errors);
$_GET["action"] = $_POST["action"] = 'create';
$action = 'create';
}
}