From 48a8f2a793d2154c7f9d963fda679e0c380cb273 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Wed, 4 Jan 2012 22:56:58 +0100 Subject: [PATCH] Content type header was sent when saving image to disk. --- lib/image.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/image.php b/lib/image.php index e09486be081..32568a25406 100644 --- a/lib/image.php +++ b/lib/image.php @@ -125,7 +125,7 @@ class OC_Image { */ public function save($filepath=null) { - if($filepath === null && $this->filepath === null) { + if($filepath === null && self::$filepath === null) { OC_Log::write('core','OC_Image::save. save() called with no path.', OC_Log::ERROR); return false; } elseif($filepath === null && $this->filepath !== null) { @@ -138,8 +138,8 @@ class OC_Image { * @brief Outputs/saves the image. */ private function _output($filepath=null, $really=false) { - header('Content-Type: '.self::mimeType()); if($really === false) { + header('Content-Type: '.self::mimeType()); $filepath = null; // Just being cautious ;-) } else { if(!is_writable(dirname($filepath))) { -- 2.39.5