This commit is contained in:
thinkphp
2017-06-01 16:22:18 +08:00
3 changed files with 4 additions and 4 deletions

View File

@@ -165,7 +165,7 @@ class Validate
}
/**
* 获取验证规则的默认提示信息
* 设置验证规则的默认提示信息
* @access protected
* @param string|array $type 验证规则类型名称或者数组
* @param string $msg 验证提示信息

View File

@@ -376,7 +376,7 @@ abstract class Builder
if ($value instanceof \Closure) {
$whereStr .= $key . ' ' . $exp . ' ' . $this->parseClosure($value);
} else {
$value = is_array($value) ? $value : explode(',', $value);
$value = array_unique(is_array($value) ? $value : explode(',', $value));
if (array_key_exists($field, $binds)) {
$bind = [];
$array = [];

View File

@@ -395,7 +395,7 @@ class Query
public function value($field, $default = null, $force = false)
{
$result = false;
if (empty($options['fetch_sql']) && !empty($this->options['cache'])) {
if (empty($this->options['fetch_sql']) && !empty($this->options['cache'])) {
// 判断查询缓存
$cache = $this->options['cache'];
if (empty($this->options['table'])) {
@@ -438,7 +438,7 @@ class Query
public function column($field, $key = '')
{
$result = false;
if (empty($options['fetch_sql']) && !empty($this->options['cache'])) {
if (empty($this->options['fetch_sql']) && !empty($this->options['cache'])) {
// 判断查询缓存
$cache = $this->options['cache'];
if (empty($this->options['table'])) {