Help the DataForm deal with bad data in its JSON.
This commit is contained in:
parent
b1b033afa5
commit
6ba8d34574
2 changed files with 8 additions and 6 deletions
|
|
@ -13,6 +13,7 @@
|
|||
- added: Vendor payout system ( Martin Kamerbeek / Oqapi )
|
||||
- fixed #9942: Upgrade script fails with ITransact driver (William McKee, Knowmad Technologies)
|
||||
- fixed #9943: Upgrade script fails with Payment Gateways
|
||||
- fixed #9948: Data form cannot be deleted.
|
||||
|
||||
7.6.14
|
||||
- fixed: IE6 shows Admin Bar over Asset Manager
|
||||
|
|
|
|||
|
|
@ -391,12 +391,13 @@ sub _cacheFieldConfig {
|
|||
my $fieldData;
|
||||
if ($jsonData && eval { $jsonData = JSON::from_json($jsonData) ; 1 }) {
|
||||
# jsonData is an array in the order the fields should be
|
||||
$self->{_fieldConfig} = {
|
||||
map { $_->{name}, $_ } @{ $jsonData }
|
||||
};
|
||||
$self->{_fieldOrder} = [
|
||||
map { $_->{name} } @{ $jsonData }
|
||||
];
|
||||
$self->{_fieldConfig} = {};
|
||||
$self->{_fieldOrder} = [];
|
||||
FIELD: foreach my $field (@{ $jsonData } ) {
|
||||
next FIELD unless ref $field eq 'HASH';
|
||||
$self->{_fieldConfig}->{$field->{name}} = $field;
|
||||
push @{ $self->{_fieldOrder} }, $field->{name};
|
||||
}
|
||||
}
|
||||
else {
|
||||
$self->{_fieldConfig} = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue