diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-10-01 06:50:48 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-10-01 06:50:48 +0000 |
| commit | 030b3dbe9a0974509f672170485944e54482be58 (patch) | |
| tree | be6daa7cf6f31253b5ad56d0f1bc8f4ba47c1082 | |
| parent | f0261cee4b9e1352139c4afee8e50a342e37f3f7 (diff) | |
Trigger warning if logs cannot be written
git-svn-id: https://svn.roundcube.net/trunk@3003 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/include/main.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 97a3db16c..6e4cbe1bc 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -1042,12 +1042,15 @@ function write_log($name, $line) $CONFIG['log_dir'] = INSTALL_PATH.'logs'; // try to open specific log file for writing - if ($fp = @fopen($CONFIG['log_dir'].'/'.$name, 'a')) { + $logfile = $CONFIG['log_dir'].'/'.$name; + if ($fp = @fopen($logfile, 'a')) { fwrite($fp, $log_entry); fflush($fp); fclose($fp); return true; } + else + trigger_error("Error writing to log file $logfile; Please check permissions", E_USER_WARNING); } return false; } |
