diff --git a/mod/data/field/picture/field.class.php b/mod/data/field/picture/field.class.php index 0aa2bd54bca..8ece8a8ec9a 100755 --- a/mod/data/field/picture/field.class.php +++ b/mod/data/field/picture/field.class.php @@ -229,7 +229,7 @@ class data_field_picture extends data_field_file { if ($thumbwidth && !$thumbheight) { $thumbheight = $image->height * $thumbwidth / $image->width; } else if($thumbheight && !$thumbwidth) { - $thumbheight = $image->width * $thumbheight / $image->height; + $thumbwidth = $image->width * $thumbheight / $image->height; } else { // BOTH are set - may need to crop if aspect ratio differs $hratio = $image->height / $thumbheight; $wratio = $image->width / $thumbwidth;