From 1303aed43f8e8891dbc35cc577059fd947a36d9b Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Thu, 23 Feb 2017 20:23:38 +0000 Subject: [PATCH] fhem.pl: fix perlSyntaxCheckRelated problems, +workaround for perseParams bug (Forum #52242) git-svn-id: https://svn.fhem.de/fhem/trunk@13496 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 09f66f06c..5d59d3ef8 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -4,7 +4,7 @@ # # Copyright notice # -# (c) 2005-2015 +# (c) 2005-2017 # Copyright: Rudolf Koenig (r dot koenig at koeniglich dot de) # All rights reserved # @@ -3065,7 +3065,11 @@ EvalSpecials($%) # $EVENT will be replaced with the whole event string # $EVTPART will be replaced with single words of an event my ($exec, %specials)= @_; - $exec = SemicolonEscape($exec); + if($specials{__UNIQUECMD__}) { + delete $specials{__UNIQUECMD__}; + } else { + $exec = SemicolonEscape($exec); + } my $idx = 0; if(defined($specials{"%EVENT"})) { @@ -4807,8 +4811,10 @@ perlSyntaxCheck($%) return undef if(!$psc || !$init_done); my ($arr, $hash) = parseParams($exec, ';'); + $arr = [ $exec ] if(!@$arr); # temporary bugfix for my $cmd (@{$arr}) { next if($cmd !~ m/^\s*{/); # } for match + $specials{__UNIQUECMD__}=1; $cmd = EvalSpecials("{return undef; $cmd}", %specials); my $r = AnalyzePerlCommand(undef, $cmd); return $r if($r);