Permalink
Browse files

return empty different type value by defferent type

  • Loading branch information...
1 parent 0dfdacb commit d5a4189a803e41ca1fb9603aa215444ae159a449 @ronalfei committed Oct 31, 2013
Showing with 10 additions and 2 deletions.
  1. +10 −2 lib/core/input.class.php
@@ -62,10 +62,18 @@ private function filter($value,$type)
return intval($value);
break;
case 2:
- return self::trimXss(addslashes($value));
+ if(empty($value)){
+ return "";
+ }else{
+ return self::trimXss(addslashes($value));
+ }
break;
case 3:
- return $value;
+ if(empty($value)){
+ return Array();
+ }else{
+ return $value;
+ }
break;
default:
return $value;

0 comments on commit d5a4189

Please sign in to comment.