summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/bootstrap.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-02-03 07:52:14 -0500
committerAleksander Machniak <alec@alec.pl>2015-02-03 07:52:14 -0500
commite17decc4c2b175e1b2e3cd79f7c8b4c39c1f70f1 (patch)
tree42b25f6c255668b662f8e5a06c7444ae3c592ea8 /program/lib/Roundcube/bootstrap.php
parente8fc8d303a30658abd70419917a1373131802e28 (diff)
Better handle log/temp directory misconfiguration
Diffstat (limited to 'program/lib/Roundcube/bootstrap.php')
-rw-r--r--program/lib/Roundcube/bootstrap.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php
index af87beb24..cc2347406 100644
--- a/program/lib/Roundcube/bootstrap.php
+++ b/program/lib/Roundcube/bootstrap.php
@@ -490,8 +490,11 @@ function rcube_autoload($classname)
*/
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);
}