Fix Contact Agenda events filter when no Third Party

Handle case where the contact is not linked to any third party.
This commit is contained in:
François J 2018-11-16 10:09:25 +01:00
parent 0d443c434e
commit a5777d30e1

View File

@ -1517,7 +1517,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
$contactstatic = new Contact($db);
$out.='<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
if ($objcon && get_class($objcon) == 'Contact' && $filterobj && get_class($filterobj) == 'Societe')
if ($objcon && get_class($objcon) == 'Contact' &&
(is_null($filterobj) || get_class($filterobj) == 'Societe'))
{
$out.='<input type="hidden" name="id" value="'.$objcon->id.'" />';
}