diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 47ae5bddf4..6ade7ccba3 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -307,8 +307,8 @@ App::shutdown() throw new Exception('Too less or too many parts', 400, Exception::GENERAL_ARGUMENT_INVALID); } - $namespace = $parts[0]; - $replace = $parts[1]; + $namespace = $parts[0] ?? ''; + $replace = $parts[1] ?? ''; $params = match ($namespace) { 'user' => (array)$user,