mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
95_holiday.pm: avoid strange regexp bug (Forum #104184)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20290 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
02fa3e3405
commit
713a1bafd9
@ -100,6 +100,7 @@ holiday_refresh($;$$)
|
||||
$hash->{HOLIDAYFILE} = "$dir/$name.holiday";
|
||||
|
||||
my @foundList;
|
||||
my %foundHash;
|
||||
foreach my $l (@holidayfile) {
|
||||
next if($l =~ m/^\s*#/);
|
||||
next if($l =~ m/^\s*$/);
|
||||
@ -216,7 +217,10 @@ holiday_refresh($;$$)
|
||||
$found = $args[3];
|
||||
}
|
||||
}
|
||||
push @foundList, $found if($found && !grep(m/^$found$/,@foundList));
|
||||
if($found && !$foundHash{$found}) {
|
||||
push @foundList, $found;
|
||||
$foundHash{$found} = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user