aboutsummaryrefslogtreecommitdiff
path: root/lib/models/MvvFile.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-09-03 11:27:11 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2024-09-03 11:27:11 +0000
commite8f8537e827df2c263dc51591f167223eb9be9f9 (patch)
treefe8f5fa9691fdaee0dbe5329cc07bf2b3b233873 /lib/models/MvvFile.php
parent6871efec608be211d476cea0ba9e51bbe21a8b6e (diff)
correctly check if there are any file refs, fixes #4556
Closes #4556 Merge request studip/studip!3359
Diffstat (limited to 'lib/models/MvvFile.php')
-rw-r--r--lib/models/MvvFile.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/models/MvvFile.php b/lib/models/MvvFile.php
index e3c0e3c..4b0be71 100644
--- a/lib/models/MvvFile.php
+++ b/lib/models/MvvFile.php
@@ -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 '';
}