Skip to content

Commit

Permalink
cleanup, php 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
leowebguy committed Mar 24, 2023
1 parent 26975ec commit ebe7554
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

All notable changes to this project will be documented in this file.

## 2.0.2 - 2023.03.23
### Cleanup, PHP 8.2

## 2.0.1 - 2023.01.28
### Readme and more
++ vanilla js examples
++ vanilla js example
++ better phpDoc
++ change $_POST to Craft::$app->request->post() < better

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Your newsletter form template can look something like this:
```twig
<form method="post" id="mailchimp">
{{ csrfInput() }}
<input type="hidden" name="tags" value="Tag_1,Tag_2">{# comma separated #}
<input type="hidden" name="tags" value="Tag_1,Tag_2">
<input type="text" name="name">
<input type="email" name="email">
<button type="submit">Submit</button>
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"newsletter",
"mailing"
],
"version": "2.0.0",
"version": "2.0.2",
"type": "craft-plugin",
"license": "MIT",
"authors": [
Expand Down
4 changes: 2 additions & 2 deletions src/services/MailchimpService.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use craft\base\Component;
use craft\helpers\App;
use DrewM\MailChimp\MailChimp as MC;
use Exception;

class MailchimpService extends Component
{
Expand Down Expand Up @@ -61,8 +62,7 @@ public function subscribe($data): array
}

return ['success' => false, 'msg' => 'Mailchimp error: ' . $result['title']];

} catch (\Exception $e) {
} catch (Exception $e) {
return ['success' => false, 'msg' => $e->getMessage()];
}
}
Expand Down

0 comments on commit ebe7554

Please sign in to comment.