Hi all,
This is crashing my Apache server when I call a method on the ExtendedImage class from a template... thoughts?
------------ CustomSiteConfig.php -------------
<?php
class CustomSiteConfig extends DataObjectDecorator {
function extraStatics() {
return array(
'db' => array(
),
'has_one' => array(
'BannerImage' => 'ExtendedImage',
'SectionImage' => 'ExtendedImage'
)
);
}
public function updateCMSFields(FieldSet &$fields) {
$fields->addFieldToTab("Root.Main", new ImageField("BannerImage", "Default Banner Image"));
$fields->addFieldToTab("Root.Main", new ImageField("SectionImage", "Default Section Image"));
}
}
?>
---------- ExtendedImage.php ------------------------------------
<?php
class ExtendedImage extends Image {
function generateSmallBanner($gd) {
$gd->setQuality(100);
return $gd->croppedResize(940,230);
}
}
?>
-----------------------------------------------------------------------
We are having this problem on both local and live servers.
Cheers
Jamie