2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

01_FHEMWEB.pm: avoid crash due to evaluated devStateIcon (Forum #132483)

git-svn-id: https://svn.fhem.de/fhem/trunk@27294 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2023-03-03 14:34:59 +00:00
parent 0def033075
commit 9866381956

View File

@ -3038,6 +3038,16 @@ FW_dev2image($;$)
Log3 $FW_wname, 1, "devStateIcon $name: $@" if($@);
return ($html, $link, 1) if(defined($html) && $html =~ m/^<.*>$/s);
$devStateIcon = $html;
if($devStateIcon) { # 132483
foreach my $l (split(" ", $devStateIcon)) {
my ($re, $iconName, $link) = split(":", $l, 3);
eval { "Hallo" =~ m/^$re$/ };
if($@) {
Log 1, "ERROR: $name devStateIcon evaluated to $devStateIcon => $@";
return "ERROR, check the log";
}
}
}
}
if(defined($devStateIcon)) {