Skip to content

Commit

Permalink
Fix Contact Agenda events filter when no Third Party
Browse files Browse the repository at this point in the history
Handle case where the contact is not linked to any third party.
  • Loading branch information
francois-opendsi committed Nov 16, 2018
1 parent 0d443c4 commit a5777d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/core/lib/company.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.'" />';
}
Expand Down

0 comments on commit a5777d3

Please sign in to comment.