25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

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]

93748a8d84
This commit is contained in:
Badlop 2023-06-13 11:42:00 +02:00
parent f40a7b1c77
commit d2c54fd5fe

View File

@ -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"};