mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 19:36:02 +00:00
95_holiday.pm: avoid strange regexp bug (Forum #104184)
git-svn-id: https://svn.fhem.de/fhem/trunk@20290 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
11a1b5d4d2
commit
68fbc2d5bd
@ -100,6 +100,7 @@ holiday_refresh($;$$)
|
|||||||
$hash->{HOLIDAYFILE} = "$dir/$name.holiday";
|
$hash->{HOLIDAYFILE} = "$dir/$name.holiday";
|
||||||
|
|
||||||
my @foundList;
|
my @foundList;
|
||||||
|
my %foundHash;
|
||||||
foreach my $l (@holidayfile) {
|
foreach my $l (@holidayfile) {
|
||||||
next if($l =~ m/^\s*#/);
|
next if($l =~ m/^\s*#/);
|
||||||
next if($l =~ m/^\s*$/);
|
next if($l =~ m/^\s*$/);
|
||||||
@ -216,7 +217,10 @@ holiday_refresh($;$$)
|
|||||||
$found = $args[3];
|
$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