70_Pushover: fix non-JSON support

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@9175 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
loredo
2015-08-30 16:32:36 +00:00
parent 72b3ea0ab7
commit f7f9e66e4f

View File

@@ -347,10 +347,9 @@ sub Pushover_ReceiveCommand($$$) {
} }
# Use JSON module if possible # Use JSON module if possible
eval { use JSON }; eval 'use JSON qw( decode_json ); 1';
if ( !$@ ) { $return = decode_json( Encode::encode_utf8($data) )
$return = decode_json( Encode::encode_utf8($data) ); if ( !$@ );
}
} }
else { else {
if ( !defined($cmd) || ref($cmd) eq "HASH" || $cmd eq "" ) { if ( !defined($cmd) || ref($cmd) eq "HASH" || $cmd eq "" ) {