Skip to content

Commit

Permalink
Fix rollback and test errno
Browse files Browse the repository at this point in the history
  • Loading branch information
KreizIT committed Jul 7, 2014
1 parent 1a2ed21 commit 4e08e2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/core/class/commonobject.class.php
Expand Up @@ -229,15 +229,16 @@ function add_contact($fk_socpeople, $type_contact, $source='external',$notrigger
}
else
{
$this->db->rollback();
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$this->error=$this->db->errno();
$this->db->rollback();
return -2;
}
else
{
$this->error=$this->db->error();
$this->db->rollback();
return -1;
}
}
Expand Down

0 comments on commit 4e08e2b

Please sign in to comment.