Skip to content

Commit b0a1c0a

Browse files
authored
Fix bug when using object storage
1 parent d3c41cf commit b0a1c0a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Service/Note.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ public function getCategory() : string {
3737

3838
public function getContent() : string {
3939
$content = $this->file->getContent();
40+
// blank files return false when using object storage as primary storage
41+
if ($content === false && $this->file->getSize() === 0) {
42+
$content = '';
43+
}
4044
if (!is_string($content)) {
4145
throw new \Exception('Can\'t read file content.');
4246
}

0 commit comments

Comments
 (0)