1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00

Fix for #816 preg_match() error on settings update

This commit is contained in:
Hillel Coren 2016-04-19 21:46:18 +03:00
parent 32d5a25f61
commit d07fec5d62

View File

@ -178,9 +178,12 @@ class AppController extends BaseController
$config = '';
foreach ($_ENV as $key => $val) {
if (preg_match('/\s/',$val)) {
$val = "'{$val}'";
}
if (is_array($val)) {
continue;
}
if (preg_match('/\s/', $val)) {
$val = "'{$val}'";
}
$config .= "{$key}={$val}\n";
}