Fixes issue when xml file is corrupt and no doc type is registered, the mvc controller factory throws an exception.
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using System.Web.SessionState;
|
||||
using Umbraco.Core;
|
||||
|
||||
namespace Umbraco.Web.Mvc
|
||||
{
|
||||
@@ -97,6 +98,10 @@ namespace Umbraco.Web.Mvc
|
||||
|
||||
public new Type GetControllerType(RequestContext requestContext, string controllerName)
|
||||
{
|
||||
if (controllerName.IsNullOrWhiteSpace())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return base.GetControllerType(requestContext, controllerName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user