Browse files

BUGFIX: Thumb image for product images.

  • Loading branch information...
1 parent 35be0e8 commit 48f7896a4877bdf9d51224f992c40fe68c1e9838 @frankmullenger committed Apr 12, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 code/product/ProductImage.php
View
4 code/product/ProductImage.php
@@ -62,7 +62,7 @@ function SummaryOfImage() {
*/
function fortemplate() {
$image = $this->Image();
- $thumb = ($image && $image->exists()) ? $image->CroppedImage(40,40) : '(No Image)';
- return $thumb;
+ $thumb = ($image && $image->exists()) ? $image->CroppedImage(40,40) : null;
+ return ($thumb && $thumb->exists()) ? $thumb->forTemplate() : '(No Image)';
}
}

0 comments on commit 48f7896

Please sign in to comment.