From 5f145cfe8f34f17350a833549df4850792e00ecd Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 29 Nov 2005 20:42:26 +0000 Subject: fixed a problem with the error handler that was failing to log a vast majority of the errors :S --- lib/log.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/log.lib.php') diff --git a/lib/log.lib.php b/lib/log.lib.php index 7a3d8faf..1273795e 100644 --- a/lib/log.lib.php +++ b/lib/log.lib.php @@ -43,9 +43,11 @@ function log_event($username='Unknown',$event_name,$event_description,$log_name= as many errors as it can and logs em */ function ampache_error_handler($errno, $errstr, $errfile, $errline) { - + switch ($errno) { case '2': + $error_name = "Runtime Error"; + break; case '128': case '8': case '32': @@ -69,7 +71,7 @@ function ampache_error_handler($errno, $errstr, $errfile, $errline) { } // end switch - $log_line = "[$errstr] $error_name on line $errline in $errfile"; + $log_line = "[$error_name] $errstr on line $errline in $errfile"; log_event($_SESSION['userdata']['username'],'error',$log_line,'ampache-error'); } // ampache_error_handler -- cgit