Skip to content

Commit 3be873c

Browse files
committed
Fixed a small bug in WorkingLanguage and WorkingCurrency that caused an exception in scheduled promotion feed file generation.
1 parent 081b680 commit 3be873c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Presentation/SmartStore.Web.Framework/WebWorkContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public Language WorkingLanguage
238238
}
239239

240240
#region Get language from URL (if possible)
241-
if (_localizationSettings.SeoFriendlyUrlsForLanguagesEnabled && _httpContext != null)
241+
if (_localizationSettings.SeoFriendlyUrlsForLanguagesEnabled && _httpContext != null && _httpContext.Request != null)
242242
{
243243
var helper = new LocalizedUrlHelper(_httpContext.Request, true);
244244
string seoCode;
@@ -361,7 +361,7 @@ public Currency WorkingCurrency
361361
}
362362

363363
// find currency by domain ending
364-
if (currency == null)
364+
if (currency == null && _httpContext != null && _httpContext.Request != null && _httpContext.Request.Url != null)
365365
{
366366
currency = _currencyService
367367
.GetAllCurrencies(storeId: _storeContext.CurrentStore.Id)

0 commit comments

Comments
 (0)