From 4f54abdda219df6afe1a40e19f3f55b8c74f546c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 11 Aug 2011 07:31:47 +0000 Subject: [PATCH] quietened PHP Warning: array_keys() expects parameter 1 to be array, null given on line 106 --- phpgwapi/inc/class.hooks.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpgwapi/inc/class.hooks.inc.php b/phpgwapi/inc/class.hooks.inc.php index a1cefdf673..bd47372322 100644 --- a/phpgwapi/inc/class.hooks.inc.php +++ b/phpgwapi/inc/class.hooks.inc.php @@ -43,7 +43,7 @@ class hooks var $table = 'egw_hooks'; /** * Hooks by location and appname - * + * * @var array $location => $app => $file */ var $locations; @@ -78,7 +78,7 @@ class hooks /** * Executes all the hooks (the user has rights to) for a given location - * + * * If no $order given, hooks are executed in the order of the applications! * * @param string|array $args location-name as string or array with keys location and @@ -103,7 +103,7 @@ class hooks if (!$no_permission_check) { // 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'])); + $apps = array_intersect((array)$apps,array_keys((array)$GLOBALS['egw_info']['user']['apps'])); } if ($order) { @@ -254,9 +254,9 @@ class hooks // some apps have setup_info for more then themselfs (eg. phpgwapi for groupdav) foreach($setup_info as $appname => $data) { - if ($data['hooks']) + if ($data['hooks']) { - if ($hdata[$appname]) + if ($hdata[$appname]) { $hdata[$appname]['hooks'] = array_merge($hdata[$appname]['hooks'],$data['hooks']); }