From ca6989aec5654d80c64104a4a42692ad707cd26c Mon Sep 17 00:00:00 2001 From: pwf0112 Date: Sat, 19 Dec 2015 15:54:12 +0800 Subject: [PATCH 1/3] =?UTF-8?q?patchQuery=E6=96=B9=E6=B3=95BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 发生异常回滚缺少返回值 --- library/traits/model/query.php | 1 + 1 file changed, 1 insertion(+) diff --git a/library/traits/model/query.php b/library/traits/model/query.php index fe589d94..52702d93 100644 --- a/library/traits/model/query.php +++ b/library/traits/model/query.php @@ -73,6 +73,7 @@ trait Query $this->commit(); } catch (\think\exception $e) { $this->rollback(); + return false; } return true; } From 4dc7130dec5dd61ea28710f5b1e09b267d5ec7e1 Mon Sep 17 00:00:00 2001 From: pwf0112 Date: Sat, 19 Dec 2015 18:09:52 +0800 Subject: [PATCH 2/3] =?UTF-8?q?Rest=E7=B1=BB=E5=90=8D=E4=B9=A6=E5=86=99?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 类名称书写不符合规范 --- library/think/controller/rest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/controller/rest.php b/library/think/controller/rest.php index 028be28c..64bed282 100644 --- a/library/think/controller/rest.php +++ b/library/think/controller/rest.php @@ -13,7 +13,7 @@ namespace think\controller; use think\Response; -abstract class rest +abstract class Rest { protected $_method = ''; // 当前请求类型 From 16e5bed127470d502e7227b463a661bfe175e780 Mon Sep 17 00:00:00 2001 From: pwf0112 Date: Sun, 20 Dec 2015 09:13:29 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=89=B9=E9=87=8F=E5=8A=A0=E8=BD=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 语言定义批量加载BUG --- library/think/lang.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/library/think/lang.php b/library/think/lang.php index a5adb6b8..1ba7c7b7 100644 --- a/library/think/lang.php +++ b/library/think/lang.php @@ -60,16 +60,20 @@ class Lang public static function load($file, $range = '') { $range = $range ?: self::$range; - $lang = is_file($file) ? include $file : []; if (!isset(self::$lang[$range])) { self::$lang[$range] = []; } // 批量定义 - if (!isset(self::$lang[$range])) { - self::$lang[$range] = []; - } ++ if (is_string($file)) { ++ $file = [$file]; ++ } ++ $lang = []; ++ foreach ($file as $_file) { ++ $_lang = is_file($_file) ? include $_file : []; ++ $lang = array_merge($lang, array_change_key_case($_lang)); + } if (!empty($lang)) { - self::$lang[$range] = array_merge(self::$lang[$range], array_change_key_case($lang)); + self::$lang[$range] = array_merge(self::$lang[$range], $lang); } return self::$lang[$range]; }