diff --git a/crmeb/app/api/controller/v1/PublicController.php b/crmeb/app/api/controller/v1/PublicController.php index d2fd95051..34fdc38c3 100644 --- a/crmeb/app/api/controller/v1/PublicController.php +++ b/crmeb/app/api/controller/v1/PublicController.php @@ -856,7 +856,7 @@ class PublicController ], true); $themeInfo = app()->make(ThemeServices::class)->getThemeInfo($theme_id, $type); - if ($themeInfo) { + if ($themeInfo && isset($themeInfo['value'])) { foreach ($themeInfo['value'] as &$userDataItem) { if ($userDataItem['name'] == 'customerService') { $userDataItem['routine_contact_type'] = (int)sys_config('routine_contact_type'); diff --git a/crmeb/crmeb/command/Util.php b/crmeb/crmeb/command/Util.php index 226983a17..a6eae6090 100644 --- a/crmeb/crmeb/command/Util.php +++ b/crmeb/crmeb/command/Util.php @@ -145,7 +145,7 @@ class Util extends Command ]; // 执行 SQL 语句 - return $this->transaction(function () use ($sql) { + return Db::transaction(function () use ($sql) { try { foreach ($sql as $item) { Db::execute($item);