Skip to content

Commit

Permalink
Merge pull request #280 from owncloud/bugfix/create-empty-file-with-e…
Browse files Browse the repository at this point in the history
…mpty-string-no-null

In case $content is null file_put_contents fails badly
  • Loading branch information
DeepDiver1975 committed Jul 9, 2018
2 parents d95af8c + f9d143c commit cc6c7d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/notesservice.php
Expand Up @@ -148,7 +148,7 @@ public function update ($id, $content, $userId){
$file->move($newFilePath);
}

$file->putContent($content);
$file->putContent($content === null ? '' : $content);

return Note::fromFile($file, $this->getTags($id));
}
Expand Down

0 comments on commit cc6c7d4

Please sign in to comment.