From 8a0c0bc82e36b68b793010ae3730f9b7dccf09d5 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 6 Apr 2021 11:04:30 +0200 Subject: [PATCH] remove old logging of bad menuaction, using error_log instead old api logging class tries to instanciate Error class, which is a PHP own class/exception since some versions --- index.php | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/index.php b/index.php index 2e7f26a04f..faef439c9a 100755 --- a/index.php +++ b/index.php @@ -102,7 +102,7 @@ if (isset($_GET['tz'])) // Check if we are using windows or normal webpage $windowed = false; -$tpl_info = EGW_SERVER_ROOT . '/phpgwapi/templates/' . basename($GLOBALS['egw_info']['user']['preferences']['common']['template_set']) . '/setup/setup.inc.php'; +$tpl_info = EGW_SERVER_ROOT . '/api/templates/' . basename($GLOBALS['egw_info']['user']['preferences']['common']['template_set']) . '/setup/setup.inc.php'; if (!file_exists($tpl_info)) { $tpl_info = EGW_SERVER_ROOT.'/'.basename($GLOBALS['egw_info']['user']['preferences']['common']['template_set']) . '/setup/setup.inc.php'; @@ -171,32 +171,12 @@ else { if(!$app || !$class || !$method || $invalid_data) { - if(@is_object($GLOBALS['egw']->log)) - { - $GLOBALS['egw']->log->message(array( - 'text' => 'W-BadmenuactionVariable, menuaction missing or corrupt: %1', - 'p1' => $menuaction, - 'line' => __LINE__, - 'file' => __FILE__ - )); - } + error_log(__FILE__.": missing or bad menuaction '$_GET[menuaction]'!"); } if(!is_array($GLOBALS[$class]->public_functions) || !$GLOBALS[$class]->public_functions[$method] && $method) { - if(@is_object($GLOBALS['egw']->log)) - { - $GLOBALS['egw']->log->message(array( - 'text' => 'W-BadmenuactionVariable, attempted to access private method: %1', - 'p1' => $method, - 'line' => __LINE__, - 'file' => __FILE__ - )); - } - } - if(@is_object($GLOBALS['egw']->log)) - { - $GLOBALS['egw']->log->commit(); + error_log(__FILE__.": invalid menuaction '$_GET[menuaction]', not in public_functions!"); } $GLOBALS['egw']->redirect_link('/home/index.php');