Skip to content

Commit

Permalink
Fix for #14 - Error if only one ratio selected
Browse files Browse the repository at this point in the history
  • Loading branch information
klaftertief committed May 31, 2012
1 parent db592fa commit bd4813a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fields/field.imagecropper.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ function displayPublishPanel(&$wrapper, $data=NULL, $flagWithError=NULL, $fieldn
$dividend = preg_replace($pattern, '$2', $ratios[0]);
$divisor = preg_replace($pattern, '$6', $ratios[0]);
$imagecropper_ratio = round($dividend/$divisor,3);
$aspect_ratio->appendChild(Widget::Input($fieldname.'[ratio]', $imagecropper_ratio, 'hidden'));
$aspect_ratio->appendChild(Widget::Input($fieldname.'[ratio]', (string)$imagecropper_ratio, 'hidden'));
$aspect_ratio->appendChild(new XMLElement('p', __('Fixed at ').$ratios[0]));
break;
default:
Expand Down

0 comments on commit bd4813a

Please sign in to comment.