From 6066cbaad4293d7d5597c73ecd434dba7ffc3691 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 23 May 2013 17:01:35 +0000 Subject: [PATCH] prevent PHP Noticed: undefined index: menuaction --- header.inc.php.template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/header.inc.php.template b/header.inc.php.template index 7e7765eac6..8bd68dcc3c 100644 --- a/header.inc.php.template +++ b/header.inc.php.template @@ -85,7 +85,8 @@ $GLOBALS['egw_info']['server']['versions']['header'] = '1.29'; if(!isset($GLOBALS['egw_info']['flags']['noapi']) || !$GLOBALS['egw_info']['flags']['noapi']) { - if (substr($_SERVER['SCRIPT_NAME'],-7) != 'dav.php' && substr($_GET['menuaction'],-10) != '_hooks.log') // dont do it for webdav/groupdav, as we can not safely switch it off again + if (substr($_SERVER['SCRIPT_NAME'],-7) != 'dav.php' && // dont do it for webdav/groupdav, as we can not safely switch it off again + (!isset($_GET['menuaction']) || substr($_GET['menuaction'],-10) != '_hooks.log')) { ob_start(); // to prevent error messages to be send before our headers }