2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 11:26:55 +00:00

01_FHEMWEB.pm: avoid crash for certain perl version (Forum #38523)

git-svn-id: https://svn.fhem.de/fhem/trunk@8833 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-06-26 09:45:17 +00:00
parent cab5533029
commit fe103bae3f

View File

@ -1025,8 +1025,8 @@ FW_detailSelect(@)
{ {
my ($d, $cmd, $list, $param) = @_; my ($d, $cmd, $list, $param) = @_;
return if(!$list || $FW_hiddenroom{input}); return if(!$list || $FW_hiddenroom{input});
my @al = map { s/:.*//;$_ } split(" ", $list); my %al = map { s/:.*//;$_ => 1 } split(" ", $list);
@al = sort keys { map { $_ => 1 } @al }; # remove duplicate items in list my @al = sort keys %al; # remove duplicate items in list
my $selEl = (defined($al[0]) ? $al[0] : " "); my $selEl = (defined($al[0]) ? $al[0] : " ");
$selEl = $1 if($list =~ m/([^ ]*):slider,/); # promote a slider if available $selEl = $1 if($list =~ m/([^ ]*):slider,/); # promote a slider if available