Skip to content

Commit

Permalink
Update CoverController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz authored Feb 5, 2024
1 parent fa4b321 commit 42074ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/VuFind/src/VuFind/Controller/CoverController.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function showAction()
if (!empty($url)) {
try {
$image = $this->proxy->fetch($url);
$contentType = $image->getHeaders()->get('content-type')->getFieldValue();
$contentType = $image?->getHeaders()?->get('content-type')?->getFieldValue() ?? '';
if (str_starts_with($contentType, 'image/')) {
return $this->displayImage(
$contentType,
Expand Down

0 comments on commit 42074ff

Please sign in to comment.