From e17decc4c2b175e1b2e3cd79f7c8b4c39c1f70f1 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 03 Feb 2015 07:52:14 -0500
Subject: [PATCH] Better handle log/temp directory misconfiguration
---
program/lib/Roundcube/bootstrap.php | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php
index af87beb..cc23474 100644
--- a/program/lib/Roundcube/bootstrap.php
+++ b/program/lib/Roundcube/bootstrap.php
@@ -490,8 +490,11 @@
*/
function rcube_pear_error($err)
{
- error_log(sprintf("%s (%s): %s",
- $err->getMessage(),
- $err->getCode(),
- $err->getUserinfo()), 0);
+ $msg = sprintf("ERROR: %s (%s)", $err->getMessage(), $err->getCode());
+
+ if ($info = $err->getUserinfo()) {
+ $msg .= ': ' . $info;
+ }
+
+ error_log($msg, 0);
}
--
Gitblit v1.9.1