From be2380fb47b05a222ec5b22deff36d5156a8c943 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 13 Jan 2006 13:08:41 -0500
Subject: [PATCH] Added labels for LDAP search

---
 program/include/bugs.inc |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/program/include/bugs.inc b/program/include/bugs.inc
index bc1a293..771f1ae 100644
--- a/program/include/bugs.inc
+++ b/program/include/bugs.inc
@@ -67,12 +67,18 @@
     if (empty($CONFIG['log_dir']))
       $CONFIG['log_dir'] = $INSTALL_PATH.'logs';
       
-    if ($fp = fopen($CONFIG['log_dir'].'/errors', 'a'))
+    // try to open specific log file for writing
+    if ($fp = @fopen($CONFIG['log_dir'].'/errors', 'a'))
     
       {
       fwrite($fp, $log_entry);
       fclose($fp);
       }
+    else
+      {
+      // send error to PHPs error handler
+      trigger_error($arg_arr['message']);
+      }
     }
 
 /*

--
Gitblit v1.9.1