From ede96c258934b4881a8a1dd3ce41a923326e2d8f Mon Sep 17 00:00:00 2001 From: dietmar63 Date: Sat, 10 Jan 2015 16:17:04 +0000 Subject: [PATCH] 98_RandomTimer: the processing of a error improved get rig of a PERL WARING: http://forum.fhem.de/index.php/topic,14010.msg243159.html#msg243159 git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@7495 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_RandomTimer.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/98_RandomTimer.pm b/fhem/FHEM/98_RandomTimer.pm index 3e9d81989..33fdb47f1 100644 --- a/fhem/FHEM/98_RandomTimer.pm +++ b/fhem/FHEM/98_RandomTimer.pm @@ -409,7 +409,10 @@ sub RandomTimer_isDisabled($) { my $disableCond = AttrVal($hash->{NAME}, "disableCond", ""); $disable = $disable || eval ($disableCond); - $@ =~ s/\n/ /g; Log3 ($hash, 3, "[$hash->{NAME}] " . $@) if ($@); + if ($@) { + $@ =~ s/\n/ /g; + Log3 ($hash, 3, "[$hash->{NAME}] " . $@); + } $disable = 0 if (!defined($disable)); return $disable;