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:
parent
2b64923f54
commit
685a05c3f4
@ -347,10 +347,9 @@ sub Pushover_ReceiveCommand($$$) {
|
||||
}
|
||||
|
||||
# Use JSON module if possible
|
||||
eval { use JSON };
|
||||
if ( !$@ ) {
|
||||
$return = decode_json( Encode::encode_utf8($data) );
|
||||
}
|
||||
eval 'use JSON qw( decode_json ); 1';
|
||||
$return = decode_json( Encode::encode_utf8($data) )
|
||||
if ( !$@ );
|
||||
}
|
||||
else {
|
||||
if ( !defined($cmd) || ref($cmd) eq "HASH" || $cmd eq "" ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user