Be a little more verbose and robust when things like permission errors break config loading
parent
247e0164d8
commit
d54171c21c
|
@ -41,6 +41,7 @@ if ( file_exists($localConfigFile) && filesize($localConfigFile) > 0 ) {
|
|||
|
||||
# Process name, value pairs from the main config file first
|
||||
$configvals = process_configfile($configFile);
|
||||
if (!$configvals) $configvals = [];
|
||||
|
||||
# Search for user created config files. If one or more are found then
|
||||
# update our config value array with those values
|
||||
|
@ -49,7 +50,8 @@ if ( is_dir($configSubFolder) ) {
|
|||
if ( is_readable($configSubFolder) ) {
|
||||
foreach ( glob($configSubFolder.'/*.conf') as $filename ) {
|
||||
//error_log("processing $filename");
|
||||
$configvals = array_replace($configvals, process_configfile($filename));
|
||||
$newconfigvals = process_configfile($filename);
|
||||
if ($newconfigvals) $configvals = array_replace($configvals, $newconfigvals);
|
||||
}
|
||||
} else {
|
||||
error_log('WARNING: ZoneMinder configuration subfolder found but is not readable. Check folder permissions on '.$configSubFolder);
|
||||
|
|
Loading…
Reference in New Issue