Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] I fixed a PHP Warning added a condition to check if ->get('rec… #1128

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions modules/recaptcha/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function process() {
*/
class Hm_Output_recaptcha_script extends Hm_Output_Module {
protected function output() {
if (!$this->get('router_login_state')) {
if (!$this->get('router_login_state') && $this->get('recaptcha_config')) {
return "<script src='https://www.google.com/recaptcha/api.js'></script>";
}
}
Expand All @@ -54,9 +54,8 @@ protected function output() {
*/
class Hm_Output_recaptcha_form extends Hm_Output_Module {
protected function output() {
if (!$this->get('router_login_state')) {
$rconf = $this->get('recaptcha_config');
return '<div class="g-recaptcha" data-sitekey="'.$this->html_safe($rconf['site_key']).'"></div>';
if (!$this->get('router_login_state') && $recaptcha_config = $this->get('recaptcha_config')) {
return '<div class="g-recaptcha" data-sitekey="'.$this->html_safe($recaptcha_config['site_key']).'"></div>';
}
}
}
Expand Down
15 changes: 0 additions & 15 deletions modules/recaptcha/recaptcha.ini

This file was deleted.