mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 15:33:23 +01:00
Infolog: Avoid errors adding app replacements if incorrect parameters given
This commit is contained in:
parent
62aeccbb0f
commit
33fcb4e657
@ -1793,6 +1793,10 @@ abstract class Merge
|
||||
public function get_app_replacements($app, $id, $content, $prefix = '')
|
||||
{
|
||||
$replacements = array();
|
||||
if(!$app || $id || !$content)
|
||||
{
|
||||
return $replacements;
|
||||
}
|
||||
if($app == 'addressbook')
|
||||
{
|
||||
return $this->contact_replacements($id, $prefix, false, $content);
|
||||
|
@ -183,9 +183,9 @@ class infolog_merge extends Api\Storage\Merge
|
||||
$info += $this->get_all_links('infolog', $id, $prefix, $content);
|
||||
|
||||
// Add contact fields
|
||||
if($array['info_link'] && $array['info_link']['app'] && $array['info_link']['id'])
|
||||
if($array['info_link'] && is_array($array['info_link']) && $array['info_link']['app'] && $array['info_link']['id'])
|
||||
{
|
||||
$info+=$this->get_app_replacements($array['info_link']['app'], $array['info_link']['id'], $content, 'info_contact');
|
||||
$info += $this->get_app_replacements($array['info_link']['app'], $array['info_link']['id'], $content, 'info_contact');
|
||||
}
|
||||
// Add owner fields
|
||||
$info += $this->contact_replacements(Api\Accounts::id2name($info_owner,'person_id'),'info_owner');
|
||||
|
Loading…
Reference in New Issue
Block a user