Skip to content
Snippets Groups Projects
Commit e8f8537e authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

correctly check if there are any file refs, fixes #4556

Closes #4556

Merge request studip/studip!3359
parent 6871efec
No related branches found
No related tags found
No related merge requests found
......@@ -79,8 +79,8 @@ class MvvFile extends ModuleManagementModel
*/
public function getDisplayName()
{
if ($this->file_refs) {
return $this->file_refs[0]->name;
if (count($this->file_refs) > 0) {
return $this->file_refs->first()->name;
}
return '';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment