mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
Merge branch 'master' of https://github.com/top-think/framework
This commit is contained in:
@@ -508,7 +508,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
$value = json_decode($value, true);
|
$value = json_decode($value, true);
|
||||||
break;
|
break;
|
||||||
case 'array':
|
case 'array':
|
||||||
$value = is_null($value) ? [] : json_decode($value, true);
|
$value = empty($value) ? [] : json_decode($value, true);
|
||||||
break;
|
break;
|
||||||
case 'object':
|
case 'object':
|
||||||
$value = empty($value) ? new \stdClass() : json_decode($value);
|
$value = empty($value) ? new \stdClass() : json_decode($value);
|
||||||
|
|||||||
@@ -1281,9 +1281,6 @@ class Route
|
|||||||
} elseif (strpos($url, '/')) {
|
} elseif (strpos($url, '/')) {
|
||||||
// [模块/控制器/操作]
|
// [模块/控制器/操作]
|
||||||
$path = explode('/', $url);
|
$path = explode('/', $url);
|
||||||
} elseif (false !== strpos($url, '=')) {
|
|
||||||
// 参数1=值1&参数2=值2...
|
|
||||||
parse_str($url, $var);
|
|
||||||
} else {
|
} else {
|
||||||
$path = [$url];
|
$path = [$url];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -379,7 +379,7 @@ abstract class Builder
|
|||||||
} else {
|
} else {
|
||||||
$zone = implode(',', $this->parseValue($value, $field));
|
$zone = implode(',', $this->parseValue($value, $field));
|
||||||
}
|
}
|
||||||
$whereStr .= $key . ' ' . $exp . ' (' . $zone . ')';
|
$whereStr .= $key . ' ' . $exp . ' (' . (empty($zone) ? "''" : $zone) . ')';
|
||||||
}
|
}
|
||||||
} elseif (in_array($exp, ['NOT BETWEEN', 'BETWEEN'])) {
|
} elseif (in_array($exp, ['NOT BETWEEN', 'BETWEEN'])) {
|
||||||
// BETWEEN 查询
|
// BETWEEN 查询
|
||||||
|
|||||||
Reference in New Issue
Block a user