summaryrefslogtreecommitdiffstats
path: root/lib/log.lib.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-11-29 20:42:26 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-11-29 20:42:26 +0000
commit5f145cfe8f34f17350a833549df4850792e00ecd (patch)
tree813c25759870984ea360e59e2f3f1d119b18b524 /lib/log.lib.php
parentc1c10a18288b598da729b3cbb2ad5fcfae3e4b30 (diff)
downloadampache-5f145cfe8f34f17350a833549df4850792e00ecd.tar.gz
ampache-5f145cfe8f34f17350a833549df4850792e00ecd.tar.bz2
ampache-5f145cfe8f34f17350a833549df4850792e00ecd.zip
fixed a problem with the error handler that was failing to log a vast majority of the errors :S
Diffstat (limited to 'lib/log.lib.php')
-rw-r--r--lib/log.lib.php6
1 files changed, 4 insertions, 2 deletions
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