mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-04-29 02:04:22 -04:00
handle bad config lines better
This commit is contained in:
@@ -78,7 +78,11 @@ BEGIN
|
||||
{
|
||||
next if ( $str =~ /^\s*$/ );
|
||||
next if ( $str =~ /^\s*#/ );
|
||||
my ( $name, $value ) = $str =~ /^\s*([^=\s]+)\s*=\s*(.+?)\s*$/;
|
||||
my ( $name, $value ) = $str =~ /^\s*([^=\s]+)\s*=\s*(.*?)\s*$/;
|
||||
if ( ! $name ) {
|
||||
print( STDERR "Warning, bad line in $config_file: $str\n" );
|
||||
next;
|
||||
} # end if
|
||||
$name =~ tr/a-z/A-Z/;
|
||||
*{$name} = sub { $value };
|
||||
push( @EXPORT_CONFIG, $name );
|
||||
|
||||
Reference in New Issue
Block a user