Commit b25470f8 authored by Maxime Besson's avatar Maxime Besson

Fix handling of empty or invalid choice overloads (#1962)

parent 55f40078
Pipeline #6808 passed with stage
in 13 minutes and 23 seconds
......@@ -849,10 +849,13 @@ sub _scanNodes {
# authChoiceModules
if ( $name eq 'authChoiceModules' ) {
hdebug(' authChoiceModules');
$n->{data}->[5] ||= {};
$n->{data}->[5] =
to_json( { map { @$_ } @{ $n->{data}->[5] } } )
if ref( $n->{data}->[5] ) eq 'ARRAY';
if ( ref( $n->{data}->[5] ) eq 'ARRAY' ) {
$n->{data}->[5] = to_json(
{ map { @$_ } @{ $n->{data}->[5] } } );
}
else {
$n->{data}->[5] = '{}';
}
}
$n->{data} = join ';', @{ $n->{data} };
......
Markdown is supported
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