From 9ac8831ecbd51b43c78cf9105c36feef96b16fd9 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Wed, 6 Oct 2021 10:14:22 +0300 Subject: [PATCH] Gracefully produce 404 error page for URLs with unknown vocabulary ID --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 320796d5e..2425b72d7 100644 --- a/index.php +++ b/index.php @@ -49,7 +49,7 @@ $vocab = $parts[1]; try { $request->setVocab($parts[1]); - } catch (Exception $e) { + } catch (Exception | ValueError $e) { $request->setLang($controller->guessLanguage()); $controller->invokeGenericErrorPage($request); return;