mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Fixed an issue with a null BaseUrl during Setup from Orchard.exe.
Fixes #6320
This commit is contained in:
parent
afc637452a
commit
b9fa87d5e2
@ -39,7 +39,10 @@ namespace Orchard.Mvc {
|
||||
// which requires activating the Site content item, which in turn requires a UrlHelper, which in turn requires a RequestContext,
|
||||
// thus preventing a StackOverflowException.
|
||||
|
||||
var baseUrl = new Func<string>(() => siteService.GetSiteSettings().BaseUrl);
|
||||
var baseUrl = new Func<string>(() =>
|
||||
siteService.GetSiteSettings().BaseUrl
|
||||
?? "http://localhost" /* When Setup is running from the command line, no BaseUrl exists yet. */);
|
||||
|
||||
var httpContextBase = new HttpContextPlaceholder(baseUrl);
|
||||
|
||||
return httpContextBase;
|
||||
|
Loading…
Reference in New Issue
Block a user