mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX #3441 funkygibbon: Stop ThumbnailStripField breaking on orphaned images
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@70997 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d8687d4063
commit
9086994807
@ -64,7 +64,7 @@ class ThumbnailStripField extends FormField {
|
||||
$result .= '<ul>';
|
||||
foreach($images as $image) {
|
||||
$thumbnail = $image->getFormattedImage('StripThumbnail');
|
||||
|
||||
if ($thumbnail instanceof Image_Cached) { //Hack here...
|
||||
// Constrain the output image to a 600x600 square. This is passed to the destwidth/destheight in the class, which are then used to
|
||||
// set width & height properties on the <img> tag inserted into the CMS. Resampling is done after save
|
||||
$width = $image->Width;
|
||||
@ -85,6 +85,7 @@ class ThumbnailStripField extends FormField {
|
||||
'</a>' .
|
||||
'</li>';
|
||||
}
|
||||
}
|
||||
$result .= '</ul>';
|
||||
} else {
|
||||
if($folder) {
|
||||
|
Loading…
Reference in New Issue
Block a user