From 39dcd2a4e4d9bee388217b4eb959a285742e1670 Mon Sep 17 00:00:00 2001 From: Anyon Date: Thu, 28 Nov 2019 17:16:45 +0800 Subject: [PATCH] ComposerUpdate --- vendor/composer/installed.json | 8 ++++---- .../think-library/src/service/SystemService.php | 10 +++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index c4f9814c1..1ca9a6ffe 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -401,12 +401,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "9b520cd35b4c7e9da6b928def3c5ec779e67bc0f" + "reference": "8821ce7703baafc18f32668cf949e803e8c19904" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/9b520cd35b4c7e9da6b928def3c5ec779e67bc0f", - "reference": "9b520cd35b4c7e9da6b928def3c5ec779e67bc0f", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/8821ce7703baafc18f32668cf949e803e8c19904", + "reference": "8821ce7703baafc18f32668cf949e803e8c19904", "shasum": "", "mirrors": [ { @@ -426,7 +426,7 @@ "qiniu/php-sdk": "^7.2", "topthink/framework": "5.1.*" }, - "time": "2019-11-28T08:41:39+00:00", + "time": "2019-11-28T09:08:14+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/vendor/zoujingli/think-library/src/service/SystemService.php b/vendor/zoujingli/think-library/src/service/SystemService.php index 7986234f9..09a06fbf6 100644 --- a/vendor/zoujingli/think-library/src/service/SystemService.php +++ b/vendor/zoujingli/think-library/src/service/SystemService.php @@ -86,10 +86,14 @@ class SystemService extends Service * @param mixed $default 默认值 * @return mixed */ - public function getData($name, $default = null) + public function getData($name, $default = []) { - $value = Db::name('SystemData')->where(['name' => $name])->value('value'); - return empty($value) ? $default : unserialize($value); + try { + $value = Db::name('SystemData')->where(['name' => $name])->value('value'); + return empty($value) ? $default : unserialize($value); + } catch (\Exception $e) { + return $default; + } } /**