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
1 changed files with 2 additions and 0 deletions

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.