Just return the value if it exists, otherwise return the default.
The guard here caused the ‘EXIT’ clause to be triggered in `ejabberd_config:prepare_opt_val/4` on line 573 of `ejabberd_config.erl`.
This commit is contained in:
parent
1ae6491e75
commit
b194fd5c99
|
@ -111,7 +111,7 @@ try_get_option(Host, OptionName, DefaultValue) ->
|
|||
true -> ok;
|
||||
_ -> throw({module_must_be_started_in_vhost, ?MODULE, Host})
|
||||
end,
|
||||
gen_mod:get_module_opt(Host, ?MODULE, OptionName, fun(I) when I -> I end, DefaultValue).
|
||||
gen_mod:get_module_opt(Host, ?MODULE, OptionName, fun(I) -> I end, DefaultValue).
|
||||
|
||||
get_option_access(Host) ->
|
||||
try_get_option(Host, access_commands, []).
|
||||
|
|
Loading…
Reference in New Issue