From 0f0f7262690934d4fb0bb54f8840aa50fafc87e5 Mon Sep 17 00:00:00 2001 From: tokumeikoi Date: Thu, 5 Aug 2021 15:22:15 +0900 Subject: [PATCH] update: fix code support php8 --- app/Console/Commands/V2boardUpdate.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/V2boardUpdate.php b/app/Console/Commands/V2boardUpdate.php index 9160a8dc..41bfbd2d 100644 --- a/app/Console/Commands/V2boardUpdate.php +++ b/app/Console/Commands/V2boardUpdate.php @@ -50,11 +50,11 @@ class V2boardUpdate extends Command abort(500, '数据库文件格式有误'); } $this->info('正在导入数据库请稍等...'); - foreach ($sql as $item) { - try { + try { + foreach ($sql as $item) { DB::select(DB::raw($item)); - } catch (\Exception $e) { } + } catch (\Exception $e) { } $this->info('更新完毕'); }