Skip to content
Permalink
Browse files

Fix the unlikely case of empty photo data in a Story asset when purging.

  • Loading branch information...
perlDreamer committed Jul 26, 2012
1 parent c120a8b commit 79c843434c07511a5c7851b32c7da1d5518d6943
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/WebGUI/Asset/Story.pm
@@ -709,7 +709,7 @@ sub purge {
##Delete all storage locations from all revisions of the Asset
my $sth = $self->session->db->read("select photo from Story where assetId=?",[$self->getId]);
STORAGE: while (my ($json) = $sth->array) {
my $photos = from_json($json);
my $photos = from_json($json || '[]');
PHOTO: foreach my $photo (@{ $photos }) {
next PHOTO unless $photo->{storageId};
my $storage = WebGUI::Storage->get($self->session,$photo->{storageId});

0 comments on commit 79c8434

Please sign in to comment.
You can’t perform that action at this time.