From: hickert Date: Wed, 27 Jul 2011 07:33:04 +0000 (+0000) Subject: Hardened error handler X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3eb735eb7a99e92abaf3702d0c5cd43b9c3ca121;p=gosa.git Hardened error handler git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20955 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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")."