diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index d3f629952b1..b5d643abc98 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -10,6 +10,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Marcos García * Copyright (C) 2015 Raphaël Doursenaud + * Copyright (C) 2018 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -295,7 +296,8 @@ if (empty($reshook)) if (! $error) { $result = $object->insertExtraFields(); - if ($result < 0) $error++; + if ($result < 0) $errors = $object->errors; + } if ($error) $action = 'edit_extras'; }