X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=class%2Ferror.class.php;h=3725004318cf27d56a11fba577bf41a93b487977;hb=3741e45c786934b2411434847a2ffc2f1d7b34d5;hp=29c6590a5d61a7d1c41f9369bc3949c0e2086e81;hpb=d4e46166df04792c6b939356ea5dfda8e47bba7b;p=squirrelmail.git diff --git a/class/error.class.php b/class/error.class.php index 29c6590a..37250043 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-2009 The SquirrelMail Project Team + * @copyright 2005-2021 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