X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=class%2Ferror.class.php;h=b26104232c49f3ffdb7a7521b1ea8352be767f7a;hb=HEAD;hp=e6d44ffaebb3c39635e3d63a99398e1e4a0c4d0a;hpb=79ba18dc89b1b096ecdf0b77169d57e0caf661db;p=squirrelmail.git diff --git a/class/error.class.php b/class/error.class.php index e6d44ffa..e9913cd5 100644 --- a/class/error.class.php +++ b/class/error.class.php @@ -5,7 +5,7 @@ * * This contains the custom error handler for SquirrelMail. * - * @copyright 2005-2013 The SquirrelMail Project Team + * @copyright 2005-2024 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -34,12 +34,12 @@ if (ini_get('docref_root')=='') ini_set('docref_root','http://www.php.net/'); class ErrorHandler { /** - * Constructor + * Constructor (PHP5 style, required in some future version of PHP) * @param object $oTemplate Template object * @param string $sTemplateFile Template containing the error template * @since 1.5.1 */ - function ErrorHandler(&$oTemplate, $sTemplateFile) { + function __construct(&$oTemplate, $sTemplateFile) { # echo 'init error handler...'; $this->TemplateName = $sTemplateFile; $this->Template =& $oTemplate; @@ -49,6 +49,16 @@ class ErrorHandler { $this->Template->assign('delayed_errors', $this->delayed_errors); } + /** + * Constructor (PHP4 style, kept for compatibility reasons) + * @param object $oTemplate Template object + * @param string $sTemplateFile Template containing the error template + * @since 1.5.1 + */ + function ErrorHandler(&$oTemplate, $sTemplateFile) { + self::__construct($oTemplate, $sTemplateFile); + } + /** * Sets the error template * @since 1.5.1 @@ -94,7 +104,7 @@ class ErrorHandler { * @private * @since 1.5.1 */ - function SquirrelMailErrorhandler($iErrNo, $sErrStr, $sErrFile, $iErrLine, $aContext) { + function SquirrelMailErrorhandler($iErrNo, $sErrStr, $sErrFile, $iErrLine, $aContext=NULL) { $aError = array( 'type' => SQM_NOTICE,// Error type, notice, warning or fatal error; 'category' => NULL, // SquirrelMail error category;