Commit c9792a95 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Ignore empty strings that represent a number.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9814 b35dd754-fafc-0310-a699-88a17e54d16e
parent 09f6a2e3
...@@ -176,13 +176,19 @@ public class IQMUCSearchHandler ...@@ -176,13 +176,19 @@ public class IQMUCSearchHandler
final FormField userAmountFF = df.getField("num_users"); final FormField userAmountFF = df.getField("num_users");
if (userAmountFF != null) if (userAmountFF != null)
{ {
numusers = Integer.parseInt(getFirstValue(userAmountFF)); String value = getFirstValue(userAmountFF);
if (value != null && !"".equals(value)) {
numusers = Integer.parseInt(value);
}
} }
final FormField maxUsersFF = df.getField("num_max_users"); final FormField maxUsersFF = df.getField("num_max_users");
if (maxUsersFF != null) if (maxUsersFF != null)
{ {
numaxusers = Integer.parseInt(getFirstValue(maxUsersFF)); String value = getFirstValue(maxUsersFF);
if (value != null && !"".equals(value)) {
numaxusers = Integer.parseInt(value);
}
} }
} }
catch (NumberFormatException e) catch (NumberFormatException e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment