Skip to content

Commit

Permalink
Merge pull request #25 from asgraf/patch-2
Browse files Browse the repository at this point in the history
Deprecation error fix #24
  • Loading branch information
dereuromark authored Jul 25, 2022
2 parents baf883d + 7bedb98 commit ce2e269
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Controller/Component/CaptchaComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ public function beforeRender(EventInterface $event): void {
return;
}

$this->getController()->viewBuilder()->setHelpers(['Captcha.Captcha']);
if (\method_exists($this->getController()->viewBuilder(), 'addHelpers')) {
$this->getController()->viewBuilder()->addHelpers(['Captcha.Captcha']);
} else {
$this->getController()->viewBuilder()->setHelpers(['Captcha.Captcha']);
}
}

/**
Expand Down

0 comments on commit ce2e269

Please sign in to comment.