Alter Workflow::Instance and Cron to return empty hashrefs instead
of undef. Fix JSON handling in Commerce::Transaction->shippingOptions. This probably isn't a problem now since it is never called as an accessor.
This commit is contained in:
parent
ada1a76b87
commit
63668be0d0
3 changed files with 3 additions and 2 deletions
|
|
@ -619,6 +619,7 @@ sub shippingOptions {
|
|||
$self->session->db->write("update transaction set shippingOptions=? where transactionId=?",[$self->{_properties}{shippingOptions},$self->{_transactionId}]);
|
||||
}
|
||||
|
||||
return {} unless defined $self->{_properties}{shippingOptions};
|
||||
return from_json($self->{_properties}{shippingOptions});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ sub get {
|
|||
return $parameters->{parameters};
|
||||
}
|
||||
else {
|
||||
return undef;
|
||||
return {};
|
||||
}
|
||||
}
|
||||
return $self->{_data}{$name};
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ sub get {
|
|||
return $parameters->{parameters};
|
||||
}
|
||||
else {
|
||||
return undef;
|
||||
return {};
|
||||
}
|
||||
}
|
||||
return $self->{_data}{$name};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue