Skip to content
Snippets Groups Projects
Commit e42176e6 authored by Gerry Weissbach's avatar Gerry Weissbach
Browse files

Avoid div by zero in get_cropped() FS#1453

darcs-hash:20080727180206-0d72e-28f6206ebe4f6c36f835c50f46d9cbe220ab6177.gz
parent a8f2bc05
No related branches found
No related tags found
No related merge requests found
......@@ -245,7 +245,8 @@ function get_cropped($file, $ext, $w, $h=0){
global $conf;
if(!$h) $h = $w;
$info = getimagesize($file); //get original size
$info = @getimagesize($file); //get original size
if($info == false) return $file; // that's no image - it's a spaceship!
// calculate crop size
$fr = $info[0]/$info[1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment