config file error
This commit is contained in:
parent
5fea3ce7e0
commit
472c014f53
@ -41,8 +41,9 @@ if (!function_exists('json_decode'))
|
|||||||
logger(1, 'json_decode is required but not available', 1, true);
|
logger(1, 'json_decode is required but not available', 1, true);
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
if (!file_exists(isset($opts['c']) ? $opts['c'] : __DIR__.'/config.json'))
|
$config = isset($opts['c']) ? $opts['c'] : __DIR__.'/config.json');
|
||||||
logger(1, 'Config file not found', 1, true);
|
if (!file_exists($config)
|
||||||
|
logger(1, 'Config file not found: '.$config, 1, true);
|
||||||
if (!$_set = @json_decode(@file_get_contents(__DIR__.'/config.json')))
|
if (!$_set = @json_decode(@file_get_contents(__DIR__.'/config.json')))
|
||||||
logger(1, 'Unable to load or parse configuration file', 1, true);
|
logger(1, 'Unable to load or parse configuration file', 1, true);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user