From: arjen Date: Thu, 13 Feb 2003 08:59:52 +0000 (+0000) Subject: Use our own error handler for PHP errors and warnings X-Git-Tag: V0_0_5~24 X-Git-Url: http://www.andromeda.nl/gitweb/?p=gnucomo.git;a=commitdiff_plain;h=73226989518a2d1530def69d3a668eb8d804b807 Use our own error handler for PHP errors and warnings --- diff --git a/src/web/page.class.php b/src/web/page.class.php index 81598be..b823aee 100644 --- a/src/web/page.class.php +++ b/src/web/page.class.php @@ -8,7 +8,7 @@ *********************** ** FILE NAME : page.class.php ** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring -** VERSION NUMBER : $Revision: 1.1 $ +** VERSION NUMBER : $Revision: 1.2 $ ** ** DESCRIPTION : Base class for Gnucomo web interface pages. ** @@ -26,22 +26,39 @@ /***************************** $Log: page.class.php,v $ - Revision 1.1 2003-02-05 09:38:42 arjen + Revision 1.2 2003-02-13 08:59:52 arjen + Use our own error handler for PHP errors and warnings + + Revision 1.1 2003/02/05 09:38:42 arjen A base class for all web interface pages ******************************/ -// RCSID = "$Id: page.class.php,v 1.1 2003-02-05 09:38:42 arjen Exp $"; +// RCSID = "$Id: page.class.php,v 1.2 2003-02-13 08:59:52 arjen Exp $"; require_once('gnucomo_config.php'); +$last_error = " "; + +function error($errno, $errstr, $errfile, $errline) +{ + global $last_error; + + $last_error = $errstr; +} + function login_form() { + global $last_error; + ?>

GNU Computer Monitoring

-

Version 0.0.4, Februari 05, 2003

+

Version 0.0.5, Februari 08, 2003

+

+

+

@@ -83,6 +100,7 @@ class page $this->database = false; $this->path = $path; session_start(); + set_error_handler("error"); } function Head()
GnoCoMo logo