diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-04-26 11:42:48 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-04-26 11:42:48 +0200 |
commit | fbd213a5f376118d82effb816ea98f2b8538e67b (patch) | |
tree | 4fec80d4f041b7f57a9bb29a3739bac165b1af56 /program | |
parent | f23ef1c96859f6b01a9268c8606a22ceb719cf3d (diff) |
Fix exit code on bootsrap errors in CLI mode (#1489044)
Diffstat (limited to 'program')
-rw-r--r-- | program/lib/Roundcube/bootstrap.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php index 929a4ff79..b7e69cb2a 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); } } |