fsf changes, meant to be rebased on upstream
[squirrelmail.git] / class / error.class.php
index 29c6590a5d61a7d1c41f9369bc3949c0e2086e81..3725004318cf27d56a11fba577bf41a93b487977 100644 (file)
@@ -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