Fix another DataForm deletion bug, deleting when there's no storage object.

This commit is contained in:
Colin Kuskie 2009-02-26 16:09:51 +00:00
parent a9a49d3205
commit a8979545ef
2 changed files with 4 additions and 5 deletions

View file

@ -1,6 +1,7 @@
7.6.14
- fixed: IE6 shows Admin Bar over Asset Manager
- fixed: #9808: Search i18n
- fixed #9808: Search i18n
- fixed #9818: deleteAttachedFiles bug (THE REVENGE)
7.6.13
- fixed AdSpace bug: impressions and clicks for most non-human web clients will not be counted.

View file

@ -484,9 +484,7 @@ sub deleteAttachedFiles {
my $form = $self->_createForm($fieldConfig->{$field}, $entryData->{$field});
if ($form->can('getStorageLocation')) {
my $storage = $form->getStorageLocation;
if ($storage) {
$storage->delete;
}
$storage->delete if $storage;
}
}
}
@ -498,7 +496,7 @@ sub deleteAttachedFiles {
my $form = $self->_createForm($fieldConfig->{$field}, $entryData->{$field});
if ($form->can('getStorageLocation')) {
my $storage = $form->getStorageLocation;
$storage->delete;
$storage->delete if $storage;
}
}
}