From 435de923eecb411bc7a10fb8dab55122b87d5466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Tue, 22 Jun 2021 16:51:48 +0800 Subject: [PATCH] =?UTF-8?q?ComposerUpdate=20&=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/composer/installed.json | 8 ++++---- vendor/composer/installed.php | 6 +++--- vendor/services.php | 2 +- vendor/zoujingli/think-library/src/command/Install.php | 4 ++-- vendor/zoujingli/think-library/src/common.php | 1 + .../think-library/src/service/CaptchaService.php | 6 +++--- .../zoujingli/think-library/src/service/SystemService.php | 7 ++++--- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 3e726fa3e..e6d26750b 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -853,12 +853,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "611043ad1974ab0926868bb44b1b2491fee13114" + "reference": "f65e5f33f582df4575a34d1f1c058ca413fb17d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/611043ad1974ab0926868bb44b1b2491fee13114", - "reference": "611043ad1974ab0926868bb44b1b2491fee13114", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/f65e5f33f582df4575a34d1f1c058ca413fb17d6", + "reference": "f65e5f33f582df4575a34d1f1c058ca413fb17d6", "shasum": "", "mirrors": [ { @@ -875,7 +875,7 @@ "ext-mbstring": "*", "topthink/framework": "^6.0" }, - "time": "2021-06-22T07:23:58+00:00", + "time": "2021-06-22T08:50:44+00:00", "default-branch": true, "type": "library", "extra": { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 999dedad4..8a556bd17 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '9b4e299239c063b71f431d974c0754fadb9a6624', + 'reference' => 'bec782fd37e6ce3da4682b02ccd87e42b7e292d5', 'name' => 'zoujingli/thinkadmin', 'dev' => false, ), @@ -144,7 +144,7 @@ 'aliases' => array( 0 => '9999999-dev', ), - 'reference' => '611043ad1974ab0926868bb44b1b2491fee13114', + 'reference' => 'f65e5f33f582df4575a34d1f1c058ca413fb17d6', 'dev_requirement' => false, ), 'zoujingli/thinkadmin' => array( @@ -153,7 +153,7 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '9b4e299239c063b71f431d974c0754fadb9a6624', + 'reference' => 'bec782fd37e6ce3da4682b02ccd87e42b7e292d5', 'dev_requirement' => false, ), 'zoujingli/wechat-developer' => array( diff --git a/vendor/services.php b/vendor/services.php index 3c48bc2a4..735046046 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\admin\\Library', diff --git a/vendor/zoujingli/think-library/src/command/Install.php b/vendor/zoujingli/think-library/src/command/Install.php index d7629aa81..6b87f9225 100644 --- a/vendor/zoujingli/think-library/src/command/Install.php +++ b/vendor/zoujingli/think-library/src/command/Install.php @@ -107,11 +107,11 @@ class Install extends Command $this->rules = array_merge($this->rules, $bind['rules']); $this->ignore = array_merge($this->ignore, $bind['ignore']); } - [$this->installFile(), $this->installData()]; + $this->installFile() && $this->installData(); } elseif (isset($this->bind[$this->name])) { $this->rules = $this->bind[$this->name]['rules'] ?? []; $this->ignore = $this->bind[$this->name]['ignore'] ?? []; - [$this->installFile(), $this->installData()]; + $this->installFile() && $this->installData(); } else { $this->output->writeln("The specified module {$this->name} is not configured with install rules"); } diff --git a/vendor/zoujingli/think-library/src/common.php b/vendor/zoujingli/think-library/src/common.php index 29e494786..5104a4a3a 100644 --- a/vendor/zoujingli/think-library/src/common.php +++ b/vendor/zoujingli/think-library/src/common.php @@ -273,6 +273,7 @@ if (!function_exists('data_save')) { * @throws DataNotFoundException * @throws DbException * @throws ModelNotFoundException + * @throws \think\admin\Exception */ function data_save($dbQuery, array $data, string $key = 'id', array $where = []) { diff --git a/vendor/zoujingli/think-library/src/service/CaptchaService.php b/vendor/zoujingli/think-library/src/service/CaptchaService.php index 519e26aad..bf09c8e86 100644 --- a/vendor/zoujingli/think-library/src/service/CaptchaService.php +++ b/vendor/zoujingli/think-library/src/service/CaptchaService.php @@ -40,7 +40,7 @@ class CaptchaService extends Service * @param array $config * @return static */ - public function initialize(array $config = []) + public function initialize(array $config = []): CaptchaService { // 动态配置属性 foreach ($config as $k => $v) if (isset($this->$k)) $this->$k = $v; @@ -64,7 +64,7 @@ class CaptchaService extends Service * @param array $config * @return $this */ - public function config(array $config = []) + public function config(array $config = []): CaptchaService { return $this->initialize($config); } @@ -140,7 +140,7 @@ class CaptchaService extends Service * 创建验证码图片 * @return string */ - private function createImage() + private function createImage(): string { // 生成背景 $img = imagecreatetruecolor($this->width, $this->height); diff --git a/vendor/zoujingli/think-library/src/service/SystemService.php b/vendor/zoujingli/think-library/src/service/SystemService.php index 31ebe567b..2f295caa1 100644 --- a/vendor/zoujingli/think-library/src/service/SystemService.php +++ b/vendor/zoujingli/think-library/src/service/SystemService.php @@ -115,12 +115,13 @@ class SystemService extends Service * @throws DataNotFoundException * @throws DbException * @throws ModelNotFoundException + * @throws \think\admin\Exception */ public function save($query, array $data, string $key = 'id', array $map = []) { - if ($query instanceof Model) $query = $query->db(); - if (is_string($query)) $query = $this->app->db->name($query); - [$query, $value] = [$query->master()->strict(false)->where($map), $data[$key] ?? null]; + $query = is_string($query) ? $this->app->db->name($query) : ($query instanceof Model ? $query->db() : $query); + if (!$query instanceof Query) throw new \think\admin\Exception('数据库操作对象异常!'); + [$value] = [$data[$key] ?? null, $query->master()->strict(false)->where($map)]; if (empty($map[$key])) if (is_string($value) && strpos($value, ',') !== false) { $query->whereIn($key, str2arr($value)); } else {