From 1ce93f9391411f2b4197b8d4f1f7a24d5804b845 Mon Sep 17 00:00:00 2001 From: Piotr Pawlow Date: Sun, 19 Mar 2017 20:18:22 +0100 Subject: Allow running without config file. --- auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'auth.php') diff --git a/auth.php b/auth.php index ccb2859..6a62130 100644 --- a/auth.php +++ b/auth.php @@ -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; -- cgit v1.2.3