Commit 98fc489e authored by Alexandre's avatar Alexandre
Browse files

Merge pull request #932 from pnax/fix-malformed-json-string

Fix internationalized testing failure with error: "malformed UTF-8
character in JSON string"
parents e97f1c0e 8f43ae66
......@@ -260,9 +260,11 @@ sub get_test_params {
my $result;
eval {
# TODO: do we use "encode_utf8" as this was the case in PostgreSQL
# (see commit diff)
$result = decode_json( $params_json );
if ( utf8::is_utf8( $params_json ) ) {
$result = decode_json( encode_utf8( $params_json ) );
} else {
$result = decode_json( $params_json );
}
};
die Zonemaster::Backend::Error::JsonError->new( reason => "$@", data => { test_id => $test_id } )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment