summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-02-01 15:19:49 +0100
committerAleksander Machniak <alec@alec.pl>2013-02-01 15:19:49 +0100
commita39fd4db67cbebc9aecb906818f578608c9180fc (patch)
treee62ef337eeb7358751ade19cbda0ced450c31267
parentb81b0c3b2ea7ccb0cdb9f1d04883df7d8f84ba4c (diff)
Set default error code (500) if not specified in raise_error()
-rw-r--r--program/lib/Roundcube/rcube.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index a914ae65a..3ae511e1e 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -1073,14 +1073,17 @@ class rcube
{
// handle PHP exceptions
if (is_object($arg) && is_a($arg, 'Exception')) {
- $err = array(
+ $arg = array(
'type' => 'php',
'code' => $arg->getCode(),
'line' => $arg->getLine(),
'file' => $arg->getFile(),
'message' => $arg->getMessage(),
);
- $arg = $err;
+ }
+
+ if (empty($arg['code'])) {
+ $arg['code'] = 500;
}
// installer