diff options
author | Matthew Wild <mwild1@gmail.com> | 2013-06-13 23:21:24 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2013-06-13 23:21:24 +0100 |
commit | 68036030e2d66232f23135cd6830e313be013432 (patch) | |
tree | c49c9c12f27f5512d0e35f6e290bbb9a43ebac59 | |
parent | 965bf743a1d221cfc7d894cc10fc70db8414418f (diff) | |
parent | 7aae7dc1a3dd11d3371945ddf911acc644153efd (diff) | |
download | prosody-68036030e2d66232f23135cd6830e313be013432.tar.gz prosody-68036030e2d66232f23135cd6830e313be013432.zip |
Merge 0.9->trunk
-rw-r--r-- | util/dataforms.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua index 8634e337..52924841 100644 --- a/util/dataforms.lua +++ b/util/dataforms.lua @@ -187,7 +187,11 @@ field_readers["list-multi"] = for value in field_tag:childtags("value") do result[#result+1] = value:get_text(); end - return result, (required and #result == 0 and "Required value missing" or nil); + if #result > 0 then + return result; + elseif required then + return nil, "Required value missing"; + end end field_readers["text-multi"] = |