mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-24 16:56:59 +01:00
Check if log files are writeable
This commit is contained in:
@@ -67,12 +67,18 @@ function log_bug($arg_arr)
|
||||
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']);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user