X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=class%2Ferror.class.php;h=74441be323d453a061b5f16ab09c842201988741;hb=HEAD;hp=739aa5c878b7ca3297960891448cbefc54694c94;hpb=d849b5708d56913f760bf1fa7a377d602935a9cd;p=squirrelmail.git diff --git a/class/error.class.php b/class/error.class.php index 739aa5c8..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-2006 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;