GetUrlParameters crash
The _urlparametersstate variable is not initialized so in GetUrlParameters it causes a crash
This commit is contained in:
@ -17,7 +17,7 @@ namespace Oqtane.Modules
|
|||||||
public abstract class ModuleBase : ComponentBase, IModuleControl
|
public abstract class ModuleBase : ComponentBase, IModuleControl
|
||||||
{
|
{
|
||||||
private Logger _logger;
|
private Logger _logger;
|
||||||
private string _urlparametersstate;
|
private string _urlparametersstate = string.Empty;
|
||||||
private Dictionary<string, string> _urlparameters;
|
private Dictionary<string, string> _urlparameters;
|
||||||
private bool _scriptsloaded = false;
|
private bool _scriptsloaded = false;
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ namespace Oqtane.Modules
|
|||||||
public Dictionary<string, string> UrlParameters {
|
public Dictionary<string, string> UrlParameters {
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_urlparametersstate == null || _urlparametersstate != PageState.UrlParameters)
|
if (string.IsNullOrEmpty(_urlparametersstate) || _urlparametersstate != PageState.UrlParameters)
|
||||||
{
|
{
|
||||||
_urlparametersstate = PageState.UrlParameters;
|
_urlparametersstate = PageState.UrlParameters;
|
||||||
_urlparameters = GetUrlParameters(UrlParametersTemplate);
|
_urlparameters = GetUrlParameters(UrlParametersTemplate);
|
||||||
|
Reference in New Issue
Block a user