Skip to content

Commit 79c8434

Browse files
committedJul 26, 2012
Fix the unlikely case of empty photo data in a Story asset when purging.

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/WebGUI/Asset/Story.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ sub purge {
709709
##Delete all storage locations from all revisions of the Asset
710710
my $sth = $self->session->db->read("select photo from Story where assetId=?",[$self->getId]);
711711
STORAGE: while (my ($json) = $sth->array) {
712-
my $photos = from_json($json);
712+
my $photos = from_json($json || '[]');
713713
PHOTO: foreach my $photo (@{ $photos }) {
714714
next PHOTO unless $photo->{storageId};
715715
my $storage = WebGUI::Storage->get($self->session,$photo->{storageId});

0 commit comments

Comments
 (0)
Please sign in to comment.