Skip to content

Commit

Permalink
Avoid Imager exceptions when creating thumbnails.
Browse files Browse the repository at this point in the history
We were telling it to just warn, but then trying to write out a non-existant file [#146: resolved].
  • Loading branch information
theory committed Mar 23, 2010
1 parent b60d925 commit f9e21ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Bric/Biz/Asset/Business/Media/Image.pm
Expand Up @@ -695,7 +695,7 @@ sub find_or_create_alternate {
=item my $created_ok = $image->create_thumbnail
Creates a thumbnail image from the supplied image object. Returns 1 on
successful completion or error string if it fails.
successful completion and C<undef> on failure.
B<Throws:> NONE.
Expand Down Expand Up @@ -724,7 +724,7 @@ sub create_thumbnail {
type => 'min',
);
},
});
}) or return;

# Save the image or die.
my $thumbfile = $self->_thumb_file;
Expand Down
8 changes: 8 additions & 0 deletions lib/Bric/Changes.pod
@@ -1,3 +1,5 @@
=encoding utf8

=head1 Name

Bric::Changes - Bricolage Changes
Expand Down Expand Up @@ -191,6 +193,12 @@ The validation of code select field code is now consistent between the element
type profile, the field type profile, and the SOAP element type interface.
Thanks to Krzysztof Rudnik for the report (Bug #140). [David]

=item *

Media no longer throw the exception “Can't call method "write" on an undefined
value” when L<Imager> is doesn't recognize an image file format. Thanks to
Matt Rolf for the report (Bug #146). [David]

=back

=head1 Version 1.11.3 (2010-01-28)
Expand Down

0 comments on commit f9e21ee

Please sign in to comment.