X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=include%2Fvalidate.php;h=9f47fb054cc694513820055b9039a48be8b53084;hp=f27fb33e27cc3ffbfb4ecd8e4b920d7ab9783b67;hb=7442e064f52840d6142548c382112faeb94c713d;hpb=ebabf3f556ea49f05496e97d7cf82d7511ab6925 diff --git a/include/validate.php b/include/validate.php index f27fb33e..9f47fb05 100644 --- a/include/validate.php +++ b/include/validate.php @@ -1,27 +1,27 @@ + +/* temporary sm_init section */ + +include_once(SM_PATH . 'class/template/template.class.php'); +include_once(SM_PATH . 'class/error.class.php'); +/* + * Initialize the template object + */ +$oTemplate = new Template($sTplDir); + +/* + * Initialize our custom error handler object + */ +$oErrorHandler = new ErrorHandler($oTemplate,'error_message.tpl'); + +/* + * Activate custom error handling + */ +if (version_compare(PHP_VERSION, "4.3.0", ">=")) { + $oldErrorHandler = set_error_handler(array($oErrorHandler, 'SquirrelMailErrorhandler')); +} else { + $oldErrorHandler = set_error_handler('SquirrelMailErrorhandler'); +} + +?> \ No newline at end of file