Skip to content
Snippets Groups Projects
Commit 0cdfa2c3 authored by Ron Lucke's avatar Ron Lucke Committed by Elmar Ludwig
Browse files

fix #257

parent 6b31abe2
No related branches found
No related tags found
No related merge requests found
......@@ -104,8 +104,12 @@ class Block extends \SimpleORMap
$config['additional_fields']['files'] = [
'get' => function ($block) {
return array_filter($block->type->getFiles(), function ($file_ref) {
$file = $file_ref->getFileType();
return $file->isDownloadable();
if ($file_ref) {
$file = $file_ref->getFileType();
return $file->isDownloadable();
} else {
return false;
}
});
},
];
......
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