Skip to content
Snippets Groups Projects
Commit f60293a6 authored by Ron Lucke's avatar Ron Lucke
Browse files

fix #803

parent 856a37ba
No related branches found
No related tags found
No related merge requests found
...@@ -100,7 +100,9 @@ class Text extends BlockType ...@@ -100,7 +100,9 @@ class Text extends BlockType
$file = $this->extractFile($element->getAttribute('src')); $file = $this->extractFile($element->getAttribute('src'));
if ($file !== null) { if ($file !== null) {
$file_copy_id = $this->copyFileById($file->id, $rangeId); $file_copy_id = $this->copyFileById($file->id, $rangeId);
$element->setAttribute('src', \FileRef::find($file_copy_id)->getDownloadURL()); if ($file_copy_id) {
$element->setAttribute('src', \FileRef::find($file_copy_id)->getDownloadURL());
}
} }
} }
$payload['text'] = $document->saveHTML(); $payload['text'] = $document->saveHTML();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment