Skip to content

Commit 28c21d6

Browse files
authored
Merge pull request dnnsoftware#6825 from bdukes/throw-on-invalid-business-controller-type
Throw when null business controller type is attempted to be created
2 parents 4a4bcbc + f5048da commit 28c21d6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

DNN Platform/Library/Entities/Modules/BusinessControllerProvider.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace DotNetNuke.Entities.Modules;
66
using System;
77

88
using DotNetNuke.Abstractions.Modules;
9+
using DotNetNuke.Common;
910
using DotNetNuke.Framework;
1011

1112
/// <summary>The <see cref="IBusinessControllerProvider"/> implementation.</summary>
@@ -36,6 +37,7 @@ public T GetInstance<T>(string businessControllerTypeName)
3637
public T GetInstance<T>(Type businessControllerType)
3738
where T : class
3839
{
40+
Requires.NotNull(nameof(businessControllerType), businessControllerType);
3941
if (typeof(T).IsAssignableFrom(businessControllerType))
4042
{
4143
return (T)this.GetInstance(businessControllerType);

0 commit comments

Comments
 (0)