From dd59b762a2491a28e6111565f7889e6175f56a8c Mon Sep 17 00:00:00 2001 From: David Siegfried <david.siegfried@uni-vechta.de> Date: Mon, 20 Nov 2023 08:51:10 +0000 Subject: [PATCH] prevent php-warnings, closes #3488 Closes #3488 Merge request studip/studip!2383 --- app/controllers/oer/endpoints.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/oer/endpoints.php b/app/controllers/oer/endpoints.php index 813e31dc3c8..cbd4b884593 100644 --- a/app/controllers/oer/endpoints.php +++ b/app/controllers/oer/endpoints.php @@ -324,6 +324,9 @@ class Oer_EndpointsController extends StudipController } page_close(); + if (!file_exists($this->material->getFilePath())) { + throw new Exception(_('Die gewünschte Datei konnte nicht gefunden werden.')); + } $filesize = filesize($this->material->getFilePath()); header("Accept-Ranges: bytes"); $start = 0; -- GitLab