From ae0bf05d9983fe61edde21da5eb926e6af64cf47 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 27 Jul 2011 07:28:15 +0000 Subject: [PATCH] Hardened error_handler git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@20954 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/php_setup.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/php_setup.inc b/gosa-core/include/php_setup.inc index f57c9b182..e2cb35c78 100644 --- a/gosa-core/include/php_setup.inc +++ b/gosa-core/include/php_setup.inc @@ -88,14 +88,17 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline) "*** PHP error information ***\n\n"); } - if (session::is_set('js') && session::get('js')==FALSE){ + if (class_exists('session') && session::is_set('js') && session::get('js')==FALSE){ $error_collector= "
"; } else { + + $warning_path = (is_callable('get_template_path')) ? get_template_path('images/warning.png') : 'images/warning.png' ; + $error_collector= "
- \"\"  + \"\"  ". _("Generating this page caused the PHP interpreter to raise some errors!")." -- 2.30.2