mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Correcting exception when commenting without setting a Url
Work Item: 16814 --HG-- branch : dev
This commit is contained in:
@@ -43,7 +43,7 @@ namespace Orchard.Comments.Controllers {
|
||||
CommentedOn = viewModel.CommentedOn
|
||||
};
|
||||
|
||||
if (!context.SiteName.StartsWith("http://") && !context.SiteName.StartsWith("https://")) {
|
||||
if (!String.IsNullOrEmpty(context.SiteName) && !context.SiteName.StartsWith("http://") && !context.SiteName.StartsWith("https://")) {
|
||||
context.SiteName = "http://" + context.SiteName;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user