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:
parent
f40a7b1c77
commit
d2c54fd5fe
|
@ -336,7 +336,7 @@ call_command([CmdString | Args], Auth, _AccessCommands, Version) ->
|
||||||
CI2,
|
CI2,
|
||||||
Version),
|
Version),
|
||||||
format_result(Result, ResultFormat);
|
format_result(Result, ResultFormat);
|
||||||
{'EXIT', {function_clause,[{lists,zip,[A1, A2], _} | _]}} ->
|
{'EXIT', {function_clause,[{lists,zip,[A1,A2|_], _} | _]}} ->
|
||||||
{NumCompa, TextCompa} =
|
{NumCompa, TextCompa} =
|
||||||
case {length(A1), length(A2)} of
|
case {length(A1), length(A2)} of
|
||||||
{L1, L2} when L1 < L2 -> {L2-L1, "less argument"};
|
{L1, L2} when L1 < L2 -> {L2-L1, "less argument"};
|
||||||
|
|
Loading…
Reference in New Issue