25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Fix check_opt_range when no boundary is configured

This commit is contained in:
Christophe Romain 2017-12-28 13:51:26 +01:00
parent e03d41647b
commit 439fe0b504

View File

@ -3315,6 +3315,8 @@ decode_get_pending(undefined, Lang) ->
{error, xmpp:err_bad_request(<<"No data form found">>, Lang)}.
-spec check_opt_range(atom(), [proplists:property()], non_neg_integer()) -> boolean().
check_opt_range(_Opt, _Opts, undefined) ->
true;
check_opt_range(Opt, Opts, Max) ->
Val = proplists:get_value(Opt, Opts, Max),
Val =< Max.