diff --git a/core/dbobject.class.php b/core/dbobject.class.php index b8ba24623..b355b1e87 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -9,6 +9,7 @@ use Combodo\iTop\Service\Events\EventData; use Combodo\iTop\Service\Events\EventException; use Combodo\iTop\Service\Events\EventService; use Combodo\iTop\Service\Events\EventServiceLog; +use Combodo\iTop\Service\Module\ModuleService; use Combodo\iTop\Service\TemporaryObjects\TemporaryObjectManager; /** @@ -6286,7 +6287,8 @@ abstract class DBObject implements iDisplay } finally { if (!$oKPI->ComputeStatsForExtension($this, $sCallback, "Event: $sEvent")) { - $oKPI->ComputeStats('FireEvent', $sEvent); + $sSignature = ModuleService::GetInstance()->GetModuleMethodSignature($this, $sCallback); + $oKPI->ComputeStats('FireEvent', "$sEvent callback: $sSignature"); } } } diff --git a/sources/Service/Events/EventService.php b/sources/Service/Events/EventService.php index 8a632297a..60b5cc9c2 100644 --- a/sources/Service/Events/EventService.php +++ b/sources/Service/Events/EventService.php @@ -159,7 +159,7 @@ final class EventService call_user_func($aEventCallback['callback'], $oEventData); - if (isset($aEventCallback['callback'][1]) && !$oKPI->ComputeStatsForExtension($aEventCallback['callback'][0], $aEventCallback['callback'][1], "Event: $sEvent")) { + if (is_array($aEventCallback['callback']) && !$oKPI->ComputeStatsForExtension($aEventCallback['callback'][0], $aEventCallback['callback'][1], "Event: $sEvent")) { $sSignature = ModuleService::GetInstance()->GetModuleMethodSignature($aEventCallback['callback'][0], $aEventCallback['callback'][1]); $oKPI->ComputeStats('FireEvent', "$sEvent callback: $sSignature"); }