From 48306a3c4f708b80143757acbe9b270be476aab4 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 20 Jul 2012 17:51:50 +0200 Subject: fix unused variables --- lib/image.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/image.php') diff --git a/lib/image.php b/lib/image.php index 01e843d8316..c438b3d67f6 100644 --- a/lib/image.php +++ b/lib/image.php @@ -24,8 +24,8 @@ //From user comments at http://dk2.php.net/manual/en/function.exif-imagetype.php if ( ! function_exists( 'exif_imagetype' ) ) { function exif_imagetype ( $filename ) { - if ( ( list($width, $height, $type, $attr) = getimagesize( $filename ) ) !== false ) { - return $type; + if ( ( $info = getimagesize( $filename ) ) !== false ) { + return $info[2]; } return false; } @@ -364,7 +364,7 @@ class OC_Image { public function load($imageref) { if(is_resource($imageref)) { if(get_resource_type($imageref) == 'gd') { - $this->resource = $res; + $this->resource = $imageref; return $this->resource; } elseif(in_array(get_resource_type($imageref), array('file','stream'))) { return $this->loadFromFileHandle($imageref); @@ -650,9 +650,6 @@ class OC_Image { OC_Log::write('core',__METHOD__.'(): No image loaded', OC_Log::ERROR); return false; } - $width_orig=imageSX($this->resource); - $height_orig=imageSY($this->resource); - //OC_Log::write('core',__METHOD__.'(): Original size: '.$width_orig.'x'.$height_orig, OC_Log::DEBUG); $process = imagecreatetruecolor($w, $h); if ($process == false) { OC_Log::write('core',__METHOD__.'(): Error creating true color image',OC_Log::ERROR); -- cgit v1.2.3