aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2017-12-28 13:51:26 +0100
committerChristophe Romain <christophe.romain@process-one.net>2017-12-28 13:51:26 +0100
commit439fe0b504210d708b2c7c94697ea1b14e178a10 (patch)
tree5d07cc959df69d76d713111b2833e87766eb6b5a /src
parentMerge branch 'master' of github.com:processone/ejabberd (diff)
Fix check_opt_range when no boundary is configured
Diffstat (limited to 'src')
-rw-r--r--src/mod_pubsub.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl
index 663c8eec8..e231a4d59 100644
--- a/src/mod_pubsub.erl
+++ b/src/mod_pubsub.erl
@@ -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.