Fix bug when using object storage
This commit is contained in:
parent
d3c41cf1dd
commit
b0a1c0a399
|
@ -37,6 +37,10 @@ class Note {
|
|||
|
||||
public function getContent() : string {
|
||||
$content = $this->file->getContent();
|
||||
// blank files return false when using object storage as primary storage
|
||||
if ($content === false && $this->file->getSize() === 0) {
|
||||
$content = '';
|
||||
}
|
||||
if (!is_string($content)) {
|
||||
throw new \Exception('Can\'t read file content.');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue