Skip to content
Snippets Groups Projects
Commit 48a8f2a7 authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

Content type header was sent when saving image to disk.

parent b6d66c47
Branches
No related tags found
No related merge requests found
......@@ -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))) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment