diff options
Diffstat (limited to 'program/lib/Roundcube/rcube_image.php')
-rw-r--r-- | program/lib/Roundcube/rcube_image.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube_image.php b/program/lib/Roundcube/rcube_image.php index a55ba1600..09bb4e81b 100644 --- a/program/lib/Roundcube/rcube_image.php +++ b/program/lib/Roundcube/rcube_image.php @@ -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; } @@ -124,6 +128,7 @@ class rcube_image } if ($result === '') { + @chmod($filename, 0600); return $type; } } @@ -147,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) @@ -183,6 +192,7 @@ class rcube_image } if ($result) { + @chmod($filename, 0600); return $type; } } @@ -223,6 +233,7 @@ class rcube_image $result = rcube::exec($convert . ' 2>&1 -colorspace RGB -quality 75 {in} {type}:{out}', $p); if ($result === '') { + @chmod($filename, 0600); return true; } } @@ -256,6 +267,7 @@ class rcube_image } if ($result) { + @chmod($filename, 0600); return true; } } |