summaryrefslogtreecommitdiffstats
path: root/lib
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
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')
-rw-r--r--lib/log.lib.php6
-rw-r--r--lib/search.php2
2 files changed, 5 insertions, 3 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
diff --git a/lib/search.php b/lib/search.php
index c84791e8..ac5a0873 100644
--- a/lib/search.php
+++ b/lib/search.php
@@ -150,7 +150,7 @@ function search_song($data,$operator,$method,$limit) {
$where_sql = rtrim($where_sql,$operator);
$sql = $base_sql . $table_sql . " WHERE" . $where_sql . $limit_sql;
-
+
$db_results = mysql_query($sql, dbh());
while ($r = mysql_fetch_assoc($db_results)) {