浏览代码

+ V::filterNotEmptyString

Piotr Labudda 7 年之前
父节点
当前提交
d27026e769
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      SE/se-lib/V.php

+ 5 - 0
SE/se-lib/V.php

@@ -328,6 +328,11 @@ class V {
 		return !empty($value);
 		return !empty($value);
 	}
 	}
 
 
+	public static function filterNotEmptyString($value) {
+		if ('0' === $value) return true;
+		return !empty($value);
+	}
+
 	public static function filterInteger($value) {// An integer or string with integer value
 	public static function filterInteger($value) {// An integer or string with integer value
 		if (is_int($value)) {
 		if (is_int($value)) {
 			return true;
 			return true;