From ab2ccdfcd72c2eff10d04143af58ea95983685f4 Mon Sep 17 00:00:00 2001 From: Jochen Sengier Date: Fri, 3 Apr 2020 11:34:15 +0200 Subject: [PATCH 1/2] Check if .grecaptcha-badge element exists before changing the style This will prevent a TypeError -> Cannot set property 'style' of null --- src/InvisibleReCaptcha.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/InvisibleReCaptcha.php b/src/InvisibleReCaptcha.php index f67ffe4..7d1eefc 100644 --- a/src/InvisibleReCaptcha.php +++ b/src/InvisibleReCaptcha.php @@ -131,11 +131,12 @@ public function renderCaptchaHTML() public function renderFooterJS($lang = null) { $html = '' . PHP_EOL; - $html .= ''; + $html .= ''; $html .= "