mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 09:15:15 +02:00
Changed mode of decode_json
This commit is contained in:
parent
2deee86f53
commit
70780070bd
@ -179,7 +179,7 @@ sub data_consumer ($$) {
|
|||||||
eval {
|
eval {
|
||||||
if ($module->{'macros'} ne '') {
|
if ($module->{'macros'} ne '') {
|
||||||
logger ($pa_config, "Decoding json macros from # $module_id plugin command '$command'", 10);
|
logger ($pa_config, "Decoding json macros from # $module_id plugin command '$command'", 10);
|
||||||
my $macros = decode_json(encode_utf8($module->{'macros'}));
|
my $macros = JSON->new->allow_nonref->decode(encode_utf8($module->{'macros'}));
|
||||||
my %macros = %{$macros};
|
my %macros = %{$macros};
|
||||||
if(ref($macros) eq "HASH") {
|
if(ref($macros) eq "HASH") {
|
||||||
foreach my $macro_id (keys(%macros))
|
foreach my $macro_id (keys(%macros))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user