mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
#5564: Fixed potential NRE when tenant RequestUrlHost is empty.
Fixes #5564.
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Orchard.MultiTenancy.Extensions {
|
||||
public static class UrlHelperExtensions {
|
||||
public static string Tenant(this UrlHelper urlHelper, ShellSettings tenantShellSettings) {
|
||||
|
||||
var requestUrlHost = tenantShellSettings.RequestUrlHost.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries).First();
|
||||
var requestUrlHost = !String.IsNullOrEmpty(tenantShellSettings.RequestUrlHost) ? tenantShellSettings.RequestUrlHost.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries).First() : null;
|
||||
|
||||
//info: (heskew) might not keep the port/vdir insertion around beyond...
|
||||
var port = string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user