From c2d95ffaeaa289752b4c7b6664b6ca112a02e350 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 2 Nov 2023 19:08:58 +0100 Subject: Roundup of issues reported by PHPStorm Mostly redundant checks, logic errors, dead code, etc. --- modules-available/dozmod/api.inc.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'modules-available/dozmod/api.inc.php') diff --git a/modules-available/dozmod/api.inc.php b/modules-available/dozmod/api.inc.php index 17298bb7..90e663aa 100644 --- a/modules-available/dozmod/api.inc.php +++ b/modules-available/dozmod/api.inc.php @@ -327,18 +327,14 @@ $location_ids = Location::getLocationRootChain($location_ids); if ($resource === 'list') { outputLectureXmlForLocation($location_ids); // Won't return on success... - fatalDozmodUnreachable(); - } elseif ($resource === 'imagemeta') { $image = readImageParam(); outputResource($image, $resource); - fatalDozmodUnreachable(); - } else { $lecture = readLectureParam($location_ids); outputResource($lecture, $resource); - fatalDozmodUnreachable(); } +fatalDozmodUnreachable(); Header('HTTP/1.1 400 Bad Request'); die("I don't know how to give you that resource"); -- cgit v1.2.3-55-g7522