fixed #9592: DataForm deleteAttachedFiles method can crash

This commit is contained in:
Graham Knop 2009-01-28 18:24:26 +00:00
parent 13d0433b53
commit e345fd8706
2 changed files with 4 additions and 1 deletions

View file

@ -1,6 +1,7 @@
7.6.11
- fixed: Syndicated Content asset doesn't work with feeds that specify their encodings via HTTP headers
- fixed #9375: Syndicated Content asset improperly decodes wide XML entities
- fixed #9592: DataForm deleteAttachedFiles method can crash
7.6.10
- fixed #9577: WebGUI::Form::Url::getValue returns blank rather than undef for blank fields

View file

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