2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-12 22:56:34 +00:00

fhem.pl: check for bad regexp in deletereading (Forum #31165)

git-svn-id: https://svn.fhem.de/fhem/trunk@7358 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-12-29 16:03:31 +00:00
parent 2a282b0fc2
commit 1fd866ec49

View File

@ -1833,6 +1833,9 @@ CommandDeleteReading($$)
my @a = split(" ", $def, 2);
return "Usage: deletereading <name> <reading>\n$namedef" if(@a != 2);
eval { "" =~ m/$a[1]/ };
return "Bad regexp $a[1]: $@" if($@);
%ntfyHash = ();
my @rets;
foreach my $sdev (devspec2array($a[0])) {