mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 15:42:48 +08:00
修正Mysql builder驱动
This commit is contained in:
4
library/think/cache/driver/Lite.php
vendored
4
library/think/cache/driver/Lite.php
vendored
@@ -36,8 +36,8 @@ class Lite
|
|||||||
if (!empty($options)) {
|
if (!empty($options)) {
|
||||||
$this->options = array_merge($this->options, $options);
|
$this->options = array_merge($this->options, $options);
|
||||||
}
|
}
|
||||||
if (substr($this->options['path'], -1) != '/') {
|
if (substr($this->options['path'], -1) != DS) {
|
||||||
$this->options['path'] .= '/';
|
$this->options['path'] .= DS;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class Mysql extends Builder
|
|||||||
$key = trim($key);
|
$key = trim($key);
|
||||||
if (strpos($key, '$.') && false === strpos($key, '(')) {
|
if (strpos($key, '$.') && false === strpos($key, '(')) {
|
||||||
// JSON字段支持
|
// JSON字段支持
|
||||||
list($field, $name) = explode($key, '$.');
|
list($field, $name) = explode('$.', $key);
|
||||||
$key = 'jsn_extract(' . $field . ', \'$.\'.' . $name . ')';
|
$key = 'jsn_extract(' . $field . ', \'$.\'.' . $name . ')';
|
||||||
}
|
}
|
||||||
if (!preg_match('/[,\'\"\*\(\)`.\s]/', $key)) {
|
if (!preg_match('/[,\'\"\*\(\)`.\s]/', $key)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user