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:
parent
0708244908
commit
aaa0128884
1 changed files with 3 additions and 0 deletions
|
|
@ -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'];
|
||||
|
|
|
|||
Loading…
Reference in a new issue