Skip to content

Commit

Permalink
Ensure that craft forms plugin is available before initializing hook. F…
Browse files Browse the repository at this point in the history
…ixes #1
  • Loading branch information
matt-west committed Jun 1, 2018
1 parent 60d344d commit 83166c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CraftRecaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function (PluginEvent $event) {
);

// Set up contact form hook.
if (class_exists('Submission')) {
if (class_exists(Submission::class)) {
Event::on(Submission::class, Submission::EVENT_BEFORE_VALIDATE, function(ModelEvent $e) {
/** @var Submission $submission */
$submission = $e->sender;
Expand Down

0 comments on commit 83166c6

Please sign in to comment.