01_FHEMWEB.pm: do not crash on wrong column spec

git-svn-id: https://svn.fhem.de/fhem/trunk@17277 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2018-09-05 12:55:01 +00:00
parent 50a05388c0
commit ed43252995

View File

@ -1983,10 +1983,15 @@ FW_parseColumns($)
foreach my $group (split(",",$groups)) {
$group =~ s/%20/ /g; # Forum #33612
$group = "^$group\$"; #71381
foreach my $g (grep /$group/ ,@grouplist) {
next if($handled{$g});
$handled{$g} = 1;
$columns{$g} = [$lineNo++, $colNo]; #23212
eval { "Hallo" =~ m/^$group$/ };
if($@) {
Log3 $FW_wname, 1, "Bad regexp in column spec: $@";
} else {
foreach my $g (grep /$group/ ,@grouplist) {
next if($handled{$g});
$handled{$g} = 1;
$columns{$g} = [$lineNo++, $colNo]; #23212
}
}
}
$colNo++;