diff options
-rw-r--r-- | includes/menu.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index e511ec6bd..b47328c43 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -337,10 +337,15 @@ function menu_execute_active_handler() { while ($path && !isset($menu['callbacks'][$path])) { $path = substr($path, 0, strrpos($path, '/')); } + if (!isset($menu['callbacks'][$path])) { return MENU_NOT_FOUND; } + if (!function_exists($menu['callbacks'][$path]['callback'])) { + return MENU_NOT_FOUND; + } + if (!_menu_item_is_accessible(menu_get_active_item())) { return MENU_ACCESS_DENIED; } @@ -352,7 +357,7 @@ function menu_execute_active_handler() { $arguments = array_merge($arguments, explode('/', $arg)); } - return function_exists($menu['callbacks'][$path]['callback']) ? call_user_func_array($menu['callbacks'][$path]['callback'], $arguments) : ''; + return call_user_func_array($menu['callbacks'][$path]['callback'], $arguments); } /** |