aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2016-03-07 17:34:08 +0100
committerBadlop <badlop@process-one.net>2016-03-07 17:34:08 +0100
commit16c1b9a5c2a6c45ee0724830fa8c38a8a6e5e833 (patch)
tree4e19bac153ee3b29d773771ef68cf184a42eb278 /src
parentDefine opt_type required be ejabberd_config behaviour. (diff)
Fix format_result also in xmlrpc, after aa5caa3 (#982)
Diffstat (limited to 'src')
-rw-r--r--src/ejabberd_xmlrpc.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ejabberd_xmlrpc.erl b/src/ejabberd_xmlrpc.erl
index 3078b64ea..c7e72d66d 100644
--- a/src/ejabberd_xmlrpc.erl
+++ b/src/ejabberd_xmlrpc.erl
@@ -491,7 +491,7 @@ format_result(Atom, {Name, atom}) ->
[{Name, iolist_to_binary(atom_to_list(Atom))}]};
format_result(Int, {Name, integer}) ->
{struct, [{Name, Int}]};
-format_result(String, {Name, string}) when is_list(String) ->
+format_result([A|_]=String, {Name, string}) when is_list(String) and is_integer(A) ->
{struct, [{Name, lists:flatten(String)}]};
format_result(Binary, {Name, string}) when is_binary(Binary) ->
{struct, [{Name, binary_to_list(Binary)}]};