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

prevent php8 warning, fixes #2180

Closes #2180

Merge request studip/studip!1406
parent 7e302e30
No related branches found
No related tags found
1 merge request!4Draft: Icon creation
......@@ -437,10 +437,7 @@ class LibraryDocument
global $LIBRARY_DOCUMENT_TYPES;
$ldt = SimpleCollection::createFromArray($LIBRARY_DOCUMENT_TYPES);
$found = $ldt->findOneBy('name', $this->type);
if ($found) {
$shape = $found['icon'];
}
$shape = $shape ?: 'literature-request';
$shape = $found['icon'] ?? 'literature-request';
return Icon::create($shape);
}
}
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