Permalink
Browse files

changed not to call crop() method twice (fixes #3062)

  • Loading branch information...
1 parent 341f509 commit a95f680bdbdebd254e17109d76496381f3c10bbc @co3k committed Aug 23, 2012
@@ -41,10 +41,13 @@ protected function doSave($outputFilename, $type, $quality)
{
$this->configureImageHandle();
- $result = $this->transform->crop($this->transform->new_x, $this->transform->new_y);
- if (PEAR::isError($result))
+ if (!$this->transform->resized)
{
- throw new sfException($result->getMessage());
+ $result = $this->transform->crop($this->transform->new_x, $this->transform->new_y);
+ if (PEAR::isError($result))
+ {
+ throw new sfException($result->getMessage());
+ }
}
$result = $this->transform->save($outputFilename, $type, $quality);

0 comments on commit a95f680

Please sign in to comment.