Skip to content

Commit

Permalink
Don't call asset methods on undef in the GalleryAlbum. Fixes bug #11681.
Browse files Browse the repository at this point in the history
  • Loading branch information
perlDreamer committed Jun 29, 2010
1 parent 20fed80 commit c350cc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/changelog/7.x.x.txt
Expand Up @@ -17,7 +17,7 @@
- fixed #11678: Story Archive leaks version tags
- fixed #11671: Approving version tags takes up 1 to hour to take affect.
- fixed #11663: More detail section of image gallery

- fixed #11681: Gallery album chokes on photo w/ missing properties

7.8.21
- fixed #11597: manageTrash and newlines
Expand Down
3 changes: 2 additions & 1 deletion lib/WebGUI/Asset/Wobject/GalleryAlbum.pm
Expand Up @@ -189,8 +189,9 @@ sub appendTemplateVarsFileLoop {
my $assetIds = shift;
my $session = $self->session;

for my $assetId (@$assetIds) {
ASSET: for my $assetId (@$assetIds) {
my $asset = WebGUI::Asset->newByDynamicClass($session, $assetId);
next ASSET unless $asset;
# Set the parent
$asset->{_parent} = $self;
push @{$var->{file_loop}}, $asset->getTemplateVars;
Expand Down

0 comments on commit c350cc2

Please sign in to comment.