mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-11 02:12:33 +01:00
Update contact.class.php (#30867)
When creating a customer and a contact at the same time if in the third-party settings the default role assignment option is empty (not filled in) an SQL error occurs.
This commit is contained in:
committed by
Laurent Destailleur
parent
0708244908
commit
aaa0128884
@@ -1893,6 +1893,9 @@ class Contact extends CommonObject
|
||||
} else {
|
||||
if (count($this->roles) > 0) {
|
||||
foreach ($this->roles as $keyRoles => $valRoles) {
|
||||
if (empty($valRoles)) {
|
||||
continue;
|
||||
}
|
||||
$idrole = 0;
|
||||
if (is_array($valRoles)) {
|
||||
$idrole = $valRoles['id'];
|
||||
|
||||
Reference in New Issue
Block a user