Browse Source

jfinal 3.4

James 7 years ago
parent
commit
c28763d7cf
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main/java/com/jfinal/core/Controller.java

+ 2 - 2
src/main/java/com/jfinal/core/Controller.java

@@ -196,7 +196,7 @@ public abstract class Controller {
 	 */
 	public Integer[] getParaValuesToInt(String name) {
 		String[] values = request.getParameterValues(name);
-		if (values == null) {
+		if (values == null || values.length == 0) {
 			return null;
 		}
 		Integer[] result = new Integer[values.length];
@@ -208,7 +208,7 @@ public abstract class Controller {
 	
 	public Long[] getParaValuesToLong(String name) {
 		String[] values = request.getParameterValues(name);
-		if (values == null) {
+		if (values == null || values.length == 0) {
 			return null;
 		}
 		Long[] result = new Long[values.length];