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:
Colin Kuskie 2008-01-31 05:34:12 +00:00
parent ada1a76b87
commit 63668be0d0
3 changed files with 3 additions and 2 deletions

View file

@ -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});
}

View file

@ -121,7 +121,7 @@ sub get {
return $parameters->{parameters};
}
else {
return undef;
return {};
}
}
return $self->{_data}{$name};

View file

@ -152,7 +152,7 @@ sub get {
return $parameters->{parameters};
}
else {
return undef;
return {};
}
}
return $self->{_data}{$name};