mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-09 11:16:39 -05:00
Compare the mailchimp variables to null rather than an empty string, and assume the .env has the variables set to something
This commit is contained in:
parent
0c2d78fae1
commit
8a2ebc48ea
2 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ MAIL_ENCRYPTION=tls
|
|||
MAIL_SENDFROM=null
|
||||
MAIL_SENDTO=null
|
||||
|
||||
MAILCHIMP_APIKEY=
|
||||
MAILCHIMP_LISTID=
|
||||
MAILCHIMP_APIKEY=null
|
||||
MAILCHIMP_LISTID=null
|
||||
|
||||
REGISTRATION=true
|
||||
|
|
|
@ -18,7 +18,7 @@ class SubscriptionController extends Controller {
|
|||
$lname = preg_match('/. ./', $name) === 1 ? preg_replace('/^[^ ][^ ]* /', '', $name) : '';
|
||||
$email = $request['email'];
|
||||
|
||||
if (env('MAILCHIMP_APIKEY', '') != '' && env('MAILCHIMP_LISTID', '') != '') {
|
||||
if (env('MAILCHIMP_APIKEY') != null && env('MAILCHIMP_LISTID') != null) {
|
||||
// Submit the subscription request
|
||||
Newsletter::subscribeOrUpdate($email, [
|
||||
'FNAME' => $fname,
|
||||
|
|
Loading…
Reference in a new issue