summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-04-26 11:42:48 +0200
committerAleksander Machniak <alec@alec.pl>2013-04-26 11:43:21 +0200
commitb542f8800e0d093afedf51c4789d901b454e4144 (patch)
tree515ee5c44b7edeaa62e3bb740cdbba23ebc3dc0c /program
parentae0c133d45fbb95a8266db505033690af46b4363 (diff)
Fix exit code on bootsrap errors in CLI mode (#1489044)
Diffstat (limited to 'program')
-rw-r--r--program/lib/Roundcube/bootstrap.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php
index 38ef216fe..177638100 100644
--- a/program/lib/Roundcube/bootstrap.php
+++ b/program/lib/Roundcube/bootstrap.php
@@ -46,8 +46,10 @@ if (php_sapi_name() != 'cli') {
foreach ($config as $optname => $optval) {
if ($optval != ini_get($optname) && @ini_set($optname, $optval) === false) {
- die("ERROR: Wrong '$optname' option value and it wasn't possible to set it to required value ($optval).\n"
- ."Check your PHP configuration (including php_admin_flag).");
+ $error = "ERROR: Wrong '$optname' option value and it wasn't possible to set it to required value ($optval).\n"
+ . "Check your PHP configuration (including php_admin_flag).";
+ if (defined('STDERR')) fwrite(STDERR, $error); else echo $error;
+ exit(1);
}
}