U4-3710, -3732 - Fix default ShortStringHelper
This commit is contained in:
@@ -801,9 +801,11 @@ namespace Umbraco.Core
|
||||
if (_helper != null)
|
||||
return _helper;
|
||||
|
||||
// there *has* to be a short string helper, even if the resolver has not
|
||||
// been initialized - used the default one with default configuration.
|
||||
_helper = new DefaultShortStringHelper().WithConfig(allowLeadingDigits: true);
|
||||
// we don't want Umbraco to die because the resolver hasn't been initialized
|
||||
// as the ShortStringHelper is too important, so as long as it's not there
|
||||
// already, we use a default one. That should never happen, but...
|
||||
Logging.LogHelper.Warn<IShortStringHelper>("ShortStringHelperResolver.HasCurrent == false, fallback to default.");
|
||||
_helper = new DefaultShortStringHelper().WithDefaultConfig();
|
||||
_helper.Freeze();
|
||||
return _helper;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user