Added more error checking in rcube_image::resize()

pull/80/head
Aleksander Machniak 11 years ago
parent a58c335769
commit 1cdcafc7fc

@ -93,6 +93,10 @@ class rcube_image
$convert = $rcube->config->get('im_convert_path', false);
$props = $this->props();
if (empty($props)) {
return false;
}
if (!$filename) {
$filename = $this->image_file;
}
@ -148,6 +152,10 @@ class rcube_image
return false;
}
if ($image === false) {
return false;
}
$scale = $size / max($props['width'], $props['height']);
// Imagemagick resize is implemented in shrinking mode (see -resize argument above)

Loading…
Cancel
Save