From b9b425d143475ec01d212bb1455a73d161ff22da Mon Sep 17 00:00:00 2001 From: yunwuxin <448901948@qq.com> Date: Fri, 9 Sep 2016 15:03:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/console/Output.php | 4 ++-- library/think/console/output/driver/Console.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/think/console/Output.php b/library/think/console/Output.php index f9eb214e..65dc9fb8 100644 --- a/library/think/console/Output.php +++ b/library/think/console/Output.php @@ -25,10 +25,10 @@ use think\console\output\question\Confirmation; * Class Output * @package think\console * - * @see think\console\output\driver\Console::setDecorated + * @see \think\console\output\driver\Console::setDecorated * @method void setDecorated($decorated) * - * @see think\console\output\driver\Buffer::fetch + * @see \think\console\output\driver\Buffer::fetch * @method string fetch() * * @method void info($message) diff --git a/library/think/console/output/driver/Console.php b/library/think/console/output/driver/Console.php index 3b8f3c7e..0dcd0f77 100644 --- a/library/think/console/output/driver/Console.php +++ b/library/think/console/output/driver/Console.php @@ -356,10 +356,10 @@ class Console { if (DIRECTORY_SEPARATOR === '\\') { return - 0 >= version_compare('10.0.10586', PHP_WINDOWS_VERSION_MAJOR . '.' . PHP_WINDOWS_VERSION_MINOR . '.' . PHP_WINDOWS_VERSION_BUILD) - || false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); + '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR . '.' . PHP_WINDOWS_VERSION_MINOR . '.' . PHP_WINDOWS_VERSION_BUILD + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM'); } return function_exists('posix_isatty') && @posix_isatty($stream); From cd9bf11172eb8de56706954733e2212a489b9e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=87=E5=AE=A2?= <9714928@qq.com> Date: Fri, 9 Sep 2016 15:48:34 +0800 Subject: [PATCH 2/3] Update Relation.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用uuid类型主键的问题 --- library/think/model/Relation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/model/Relation.php b/library/think/model/Relation.php index 0af4d3b8..1dc43e6e 100644 --- a/library/think/model/Relation.php +++ b/library/think/model/Relation.php @@ -602,7 +602,7 @@ class Relation // 保存关联表数据 $model = new $this->model; $id = $model->save($data); - } elseif (is_numeric($data)) { + } elseif (is_numeric($data) || is_string($data)) { // 根据关联表主键直接写入中间表 $id = $data; } elseif ($data instanceof Model) { @@ -634,7 +634,7 @@ class Relation { if (is_array($data)) { $id = $data; - } elseif (is_numeric($data)) { + } elseif (is_numeric($data) || is_string($data)) { // 根据关联表主键直接写入中间表 $id = $data; } elseif ($data instanceof Model) { From 0c0da5fd44e069b5e95928102c3251a063e09dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=87=E5=AE=A2?= <9714928@qq.com> Date: Fri, 9 Sep 2016 15:54:42 +0800 Subject: [PATCH 3/3] =?UTF-8?q?json=E5=AD=97=E6=AE=B5=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit explode 参数位置错误 --- library/think/db/builder/Pgsql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/builder/Pgsql.php b/library/think/db/builder/Pgsql.php index 6f256e0e..0a955a5b 100644 --- a/library/think/db/builder/Pgsql.php +++ b/library/think/db/builder/Pgsql.php @@ -50,7 +50,7 @@ class Pgsql extends Builder $key = trim($key); if (strpos($key, '$.') && false === strpos($key, '(')) { // JSON字段支持 - list($field, $name) = explode($key, '$.'); + list($field, $name) = explode('$.', $key); $key = $field . '->>\'' . $name . '\''; } return $key;