From 3eb735eb7a99e92abaf3702d0c5cd43b9c3ca121 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 27 Jul 2011 07:33:04 +0000 Subject: [PATCH] Hardened error handler git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20955 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/php_setup.inc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/gosa-core/include/php_setup.inc b/gosa-core/include/php_setup.inc index 258c467c9..8dd1005e1 100644 --- a/gosa-core/include/php_setup.inc +++ b/gosa-core/include/php_setup.inc @@ -96,18 +96,25 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline) "\n\n". "*** 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_image = (is_callable('image')) ? + image('images/toolbar-warning.png') : ""; + $mailto_image = (is_callable('image')) ? + image('images/mailto.png') : ""; + $error_collector= " - +
".image('images/toolbar-warning.png')."{$warning_image} "._("Generating this page caused the PHP interpreter to raise some errors!")." - ".image('images/mailto.png')." "._("Send bug report")." + {$mailto_image} "._("Send bug report")." -- 2.30.2