Correcting exception when commenting without setting a Url

Work Item: 16814

--HG--
branch : dev
This commit is contained in:
Sébastien Ros
2010-11-19 06:03:22 -08:00
parent c08b75e047
commit 0fdae21fd4

View File

@@ -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;
}