aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/oer/endpoints.php
diff options
context:
space:
mode:
authorDavid Siegfried <david.siegfried@uni-vechta.de>2023-11-20 08:51:10 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2023-11-20 08:51:10 +0000
commit5e3b1842757e9c83faf961ac9d198a863a37b0d7 (patch)
treec1c962d9c544a3e2be30158c4c63e6536dfe6969 /app/controllers/oer/endpoints.php
parent3f4caedfd4a78c8a2bce05511853bb05c8d5d130 (diff)
prevent php-warnings, closes #3488
Closes #3488 Merge request studip/studip!2383
Diffstat (limited to 'app/controllers/oer/endpoints.php')
-rw-r--r--app/controllers/oer/endpoints.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/oer/endpoints.php b/app/controllers/oer/endpoints.php
index 813e31d..cbd4b88 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;