連絡フォーム #17
|
@ -79,7 +79,7 @@ class Contact {
|
|||
Storage::disk('public')->put($filename, $this->field['gpg']);
|
||||
$path = Storage::disk('public')->path($filename);
|
||||
$verifygpg = explode("\n", $this->run('gpg --dry-run --import '.$path))[0];
|
||||
if (!str_contains($verifygpg, '処理数の合計: 1')) $err[] = $verifygpg;
|
||||
if (!str_contains($verifygpg, '処理数の合計: 1') && !str_contains($verifygpg, 'Total number processed: 1')) $err[] = $verifygpg;
|
||||
}
|
||||
|
||||
// 文章
|
||||
|
@ -106,6 +106,7 @@ class Contact {
|
|||
Mail::to(config('mail.from.address'))->send(new ContactNotifyMail($this->field, $filename));
|
||||
} catch (\Throwable $e) {
|
||||
Storage::disk('public')->delete($filename);
|
||||
$this->field['bunsyo'] = $gpg->decrypt($this->field['bunsyo']);
|
||||
Log::critical($e);
|
||||
return view('pages.site.contact', ['field' => $this->field, 'err' => ['送信に失敗しました。数時間後もう一回送信してみて下さい。']]);
|
||||
}
|
||||
|
|
新しいイシューから参照