Fix: [ bug #1471 ] Several PHP warnings when intercepting USER_CREATE

trigger
This commit is contained in:
Laurent Destailleur 2014-07-02 19:57:18 +02:00
parent 2537a9d35f
commit ea310efba5
2 changed files with 3 additions and 2 deletions

View File

@ -68,6 +68,7 @@ For users:
- Fix: [ bug #1478 ] BILL_PAYED trigger action does not intercept failure under some circumstances
- Fix: [ bug #1479 ] Several customer invoice triggers do not intercept trigger action
- Fix: [ bug #1477 ] Several customer invoice triggers do not show trigger error messages
- Fix: [ bug #1471 ] Several PHP warnings when intercepting USER_CREATE trigger.
TODO
- New: Predefined product and free product use same form.

View File

@ -238,8 +238,8 @@ if ($action == 'add' && $canadduser)
{
$langs->load("errors");
$db->rollback();
if (is_array($object->errors) && count($object->errors)) $message='<div class="error">'.join('<br>',$langs->trans($object->errors)).'</div>';
else $message='<div class="error">'.$langs->trans($object->error).'</div>';
if (is_array($object->errors) && count($object->errors)) setEventMessage($object->errors,'errors');
else setEventMessage($object->error);
$action="create"; // Go back to create page
}