1
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-04 22:19:38 +00:00

70_Pushover: fix non-JSON support

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@9175 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2015-08-30 16:32:36 +00:00
parent 2b64923f54
commit 685a05c3f4

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 "" ) {