if (!$GLOBALS['conf']['image']['driver']) {
return false;
}
+
$context = array('tmpdir' => Horde::getTempdir());
if (!empty($GLOBALS['conf']['image']['convert'])) {
$context['convert'] = $GLOBALS['conf']['image']['convert'];
if (!$img->hasCapability('multipage') && !$img->hasCapability('pdf')) {
return false;
}
-
+
if ($load) {
try {
$ret = $img->loadString($this->_mimepart->getContents());
}
}
- return $img->getImageAtIndex(0);
+ try {
+ return $img->getImageAtIndex(0);
+ } catch (Horde_Image_Exception $e) {
+ return false;
+ }
}
/**