diff options
| author | Piotr Pawlow <pp@siedziba.pl> | 2017-03-19 20:18:22 +0100 |
|---|---|---|
| committer | Piotr Pawlow <pp@siedziba.pl> | 2017-03-19 20:18:22 +0100 |
| commit | 1ce93f9391411f2b4197b8d4f1f7a24d5804b845 (patch) | |
| tree | 25edfae95c95e4d3e357712f84085f27c1e7df0c | |
| parent | e75b599b71951cd92b023de2a81bbbed0a965b8f (diff) | |
Allow running without config file.
| -rw-r--r-- | auth.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -15,7 +15,7 @@ if ($lockfile === FALSE) die("Cannot open lock file\n"); if (!flock($lockfile, LOCK_EX)) die("Cannot acquire exclisive lock\n"); $options = getopt("c:"); -$config = load_config(@$options['c']); +if (isset($options['c'])) $config = load_config($options['c']); else $config = new stdClass(); $config_default = load_config(__DIR__.'/config_default.json'); foreach($config_default as $k => $v) if (!isset($config->{$k})) $config->{$k} = $v; |
