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 ...@@ -104,8 +104,12 @@ class Block extends \SimpleORMap
$config['additional_fields']['files'] = [ $config['additional_fields']['files'] = [
'get' => function ($block) { 'get' => function ($block) {
return array_filter($block->type->getFiles(), function ($file_ref) { return array_filter($block->type->getFiles(), function ($file_ref) {
$file = $file_ref->getFileType(); if ($file_ref) {
return $file->isDownloadable(); $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.
Please register or to comment