diff --git a/app/Http/Controllers/Home/Contact.php b/app/Http/Controllers/Home/Contact.php index b5dc595..340f0eb 100644 --- a/app/Http/Controllers/Home/Contact.php +++ b/app/Http/Controllers/Home/Contact.php @@ -87,7 +87,7 @@ class Contact { // 文章 if (!isset($this->field['bunsyo']) || is_null($this->field['bunsyo']) || $this->field['bunsyo'] == '') $err[] = '文章をご入力下さい。'; if (str_contains($this->field['bunsyo'], 'http://') || str_contains($this->field['bunsyo'], 'https://')) $err[] = '文章でURLを入らないで下さい。'; - $this->field['bunsyo'] = $gpg->encrypt(trim("メール: ".$this->field['adr']."\n\n".$this->field['bunsyo'])); + if (isset($this->field['gpg'])) $this->field['bunsyo'] = $gpg->encrypt(trim("メール: ".$this->field['adr']."\n\n".$this->field['bunsyo'])); // 連絡ルール if (!$this->field['ruleapply']) $err[] = 'ルールを同意して下さい。';