From 2d05caa701fee07c13b6f8e74f70934791b4f8ba Mon Sep 17 00:00:00 2001 From: markusbloch <> Date: Sun, 31 Jan 2016 15:46:23 +0000 Subject: [PATCH] PRESENCE: fix log warning "use of uninitialized value ..." when using power set command without any argument. (Forum: #48499) git-svn-id: https://svn.fhem.de/fhem/trunk@10686 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 2 ++ fhem/FHEM/73_PRESENCE.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index c2ff8e86f..b0d044ae9 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: PRESENCE: fix log warning "use of uninitialized value ..." when + using power set command without any argument. - added: 60_allergy: Allergy forecast data for Germany - feature: FB_CALLLIST: new attribute number-cmd to execute a FHEM command when clicking on a external number within the calllist. Can be any diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm index 8c2930f99..7b58aec17 100755 --- a/fhem/FHEM/73_PRESENCE.pm +++ b/fhem/FHEM/73_PRESENCE.pm @@ -285,7 +285,7 @@ PRESENCE_Set($@) my %specials= ( "%NAME" => $name, "%ADDRESS" => $hash->{ADDRESS}, - "%ARGUMENT" => $a[2] + "%ARGUMENT" => (defined($a[2]) ? $a[2] : "") ); $powerCmd= EvalSpecials($powerCmd, %specials);