diff --git a/phpgwapi/inc/class.hooks.inc.php b/phpgwapi/inc/class.hooks.inc.php index f713c0f7b9..e5919caaa0 100644 --- a/phpgwapi/inc/class.hooks.inc.php +++ b/phpgwapi/inc/class.hooks.inc.php @@ -97,12 +97,13 @@ class hooks $location = is_array($args) ? $args['location'] : $args; $hooks = $this->locations[$location]; - if (!isset($hooks)) return array(); // not a single app implements that hook + if (!isset($hooks) || empty($hooks)) return array(); // not a single app implements that hook $apps = array_keys($hooks); if (!$no_permission_check) { - $apps = array_intersect($apps,array_keys($GLOBALS['egw_info']['user']['apps'])); + // on install of a new egroupware both hook-apps and user apps may be empty/not set + $apps = array_intersect((array)$apps,(array)array_keys($GLOBALS['egw_info']['user']['apps'])); } if ($order) {