mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 12:30:04 +01:00
* addressbook: fix for attempt to remove non existing link; happens when addressbook read returns nothing, that may be caused by trying to merge an addressbook-entry with nonexisting customfields array
This commit is contained in:
parent
3c469c8392
commit
6549d3e463
@ -577,7 +577,7 @@ class addressbook_sql extends so_sql_cf
|
||||
// Change autoinc_id to match $this->db_cols
|
||||
$this->autoinc_id = $this->db_cols[$this->autoinc_id];
|
||||
if(($id = (int)$this->data[$this->autoinc_id]) && $cfs = $this->read_customfields($keys)) {
|
||||
$contact = array_merge($contact,$cfs[$id]);
|
||||
if (is_array($cfs[$id])) $contact = array_merge($contact,$cfs[$id]);
|
||||
}
|
||||
$this->autoinc_id = array_search($this->autoinc_id, $this->db_cols);
|
||||
|
||||
|
@ -1449,7 +1449,7 @@ class addressbook_ui extends addressbook_bo
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['link_to']['to_id'] = $contact_id;
|
||||
if (is_int($contact_id)) $content['link_to']['to_id'] = $contact_id;
|
||||
}
|
||||
// automatic link new entries to entries specified in the url
|
||||
if (!$contact_id && isset($_REQUEST['link_app']) && isset($_REQUEST['link_id']) && !is_array($content['link_to']['to_id']))
|
||||
|
Loading…
Reference in New Issue
Block a user