From a9da3aca81802453f4b6bc3fdc96a39e72332563 Mon Sep 17 00:00:00 2001 From: snipe Date: Sun, 17 Aug 2025 14:06:49 +0100 Subject: [PATCH] Combine fields and fieldset exception Signed-off-by: snipe --- app/Exceptions/Handler.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 8c9f92b8dc..a2896e79ca 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -143,7 +143,7 @@ class Handler extends ExceptionHandler ->withInput(); } - // This gets the MVC model name from the exception and formats in a way that's less fugly + // This gets the MVC model name from the exception and formats in a way that's less fugly $model_name = trim(strtolower(implode(" ", preg_split('/(?=[A-Z])/', last(explode('\\', $e->getModel())))))); $route = str_plural(strtolower(last(explode('\\', $e->getModel())))).'.index'; @@ -160,9 +160,7 @@ class Handler extends ExceptionHandler $route = 'maintenances.index'; } elseif ($route === 'licenseseats.index') { $route = 'licenses.index'; - } elseif ($route === 'customfields.index') { - $route = 'fields.index'; - } elseif ($route === 'customfieldsets.index') { + } elseif (($route === 'customfieldsets.index') || ($route === 'customfields.index')) { $route = 'fields.index'; }