From d2c54fd5fee2e35cb136feb4db440416f8d19d6e Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 13 Jun 2023 11:42:00 +0200 Subject: [PATCH] Fix calling ejabberdctl command with wrong number of arguments with Erlang 26 In Erlang up to 25.3, the lists:zip arguments were [A1, A2] Since Erlang 26.0, the arguments are: [A1, A2, fail] https://github.com/erlang/otp/commit/93748a8d841efc8f8246074ca721607efecebe2d --- src/ejabberd_ctl.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl index 314dd7d98..93f372372 100644 --- a/src/ejabberd_ctl.erl +++ b/src/ejabberd_ctl.erl @@ -336,7 +336,7 @@ call_command([CmdString | Args], Auth, _AccessCommands, Version) -> CI2, Version), format_result(Result, ResultFormat); - {'EXIT', {function_clause,[{lists,zip,[A1, A2], _} | _]}} -> + {'EXIT', {function_clause,[{lists,zip,[A1,A2|_], _} | _]}} -> {NumCompa, TextCompa} = case {length(A1), length(A2)} of {L1, L2} when L1 < L2 -> {L2-L1, "less argument"};