mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
16958 NullRef Exception when browsing to the Widgets admin if Theme.txt for an enabled Theme is missing "Zones" metadata
--HG-- branch : dev
This commit is contained in:
@@ -43,7 +43,7 @@ namespace Orchard.Widgets.Services {
|
|||||||
public IEnumerable<string> GetZones() {
|
public IEnumerable<string> GetZones() {
|
||||||
return _featureManager.GetEnabledFeatures()
|
return _featureManager.GetEnabledFeatures()
|
||||||
.Select(x => x.Extension)
|
.Select(x => x.Extension)
|
||||||
.Where(x => DefaultExtensionTypes.IsTheme(x.ExtensionType))
|
.Where(x => DefaultExtensionTypes.IsTheme(x.ExtensionType) && x.Zones != null)
|
||||||
.SelectMany(x => x.Zones.Split(','))
|
.SelectMany(x => x.Zones.Split(','))
|
||||||
.Distinct()
|
.Distinct()
|
||||||
.Select(x => x.Trim())
|
.Select(x => x.Trim())
|
||||||
|
Reference in New Issue
Block a user