From 1ce72a030fc1c4679d1ef6477fde3069e6bbe66a Mon Sep 17 00:00:00 2001 From: Moacir Date: Thu, 24 Jul 2014 12:29:09 -0300 Subject: [PATCH] Fix the methods signature and passing parameters --- Model/Behavior/UploadBehavior.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Model/Behavior/UploadBehavior.php b/Model/Behavior/UploadBehavior.php index 5a42a17..3f2c272 100644 --- a/Model/Behavior/UploadBehavior.php +++ b/Model/Behavior/UploadBehavior.php @@ -642,11 +642,11 @@ public function createThumbs(Model $model, $type, $file) { * * @return void */ - public function createThumb($file, $name, $width, $height, $crop = false) { - $imagine = $this->getImagine(); + public function createThumb(Model $model, $file, $name, $width, $height, $crop = false) { + $imagine = $this->getImagine($model); $image = $imagine->open($file); - $this->__generateThumb( + $this->_generateThumb( array( 'w' => $width, 'h' => $height, @@ -696,7 +696,7 @@ protected function _generateThumb($thumb, $image, $crop = false) { $mode = Imagine\Image\ImageInterface::THUMBNAIL_INSET; } - $thumbnail = $image->thumbnail( + $thumbnail = $image->thumbnail( new Imagine\Image\Box( $thumb['w'], $thumb['h']