General discussion
Fatal Error - Sign Up

Admin > Spam Control > ReCaptcha > Enable recaptcha? > Yes


//Codoforum v.5.1. (php 7.2, mysql 5.7)


Use Google's No CAPTCHA reCAPTCHA v2, but if user doesn't fill in Captcha and just click Submit, the next fatal error is shown.smile


63563b4d3564f


Fatal error: Uncaught Error: Call to a member function isSuccess() on null in C:\OSPanel\domains\test.loc\sys\CODOF\User\Register.php:234 Stack trace: #0 C:\OSPanel\domains\test.loc\sys\Controller\user.php(312): CODOF\User\Register->get_errors() #1 C:\OSPanel\domains\test.loc\routes.php(642): Controller\user->register(true) #2 [internal function]: {closure}() #3 C:\OSPanel\domains\test.loc\sys\CODOF\Router\Router.php(91): call_user_func_array(Object(Closure), Array) #4 C:\OSPanel\domains\test.loc\sys\CODOF\Router\Router.php(56): CODOF\Router\Router::_dispatch(Object(FastRoute\Dispatcher\GroupCountBased)) #5 C:\OSPanel\domains\test.loc\routes.php(892): CODOF\Router\Router::dispatch() #6 C:\OSPanel\domains\test.loc\index.php(22): require('C:\OSPanel\doma...' ) #7 {main} thrown in C:\OSPanel\domains\test.loc\sys\CODOF\User\Register.php on line 234


Need help




Also I need to add any kind of Honeypot to Register page. Who can share working code?smile


Admin > Spam Control > ReCaptcha > Enable recaptcha? > Yes //Codoforum v.5.1. (php 7.2, mysql 5.7) Use Google's **No CAPTCHA reCAPTCHA v2**, but if user doesn't fill in Captcha and just click Submit, the next fatal error is shown.x( ![63563b4d3564f](serve/attachment&path=63563b4d3564f) Fatal error: Uncaught Error: Call to a member function isSuccess() on null in C:\OSPanel\domains\test.loc\sys\CODOF\User\Register.php:234 Stack trace: #0 C:\OSPanel\domains\test.loc\sys\Controller\user.php(312): CODOF\User\Register->get_errors() #1 C:\OSPanel\domains\test.loc\routes.php(642): Controller\user->register(true) #2 [internal function]: {closure}() #3 C:\OSPanel\domains\test.loc\sys\CODOF\Router\Router.php(91): call_user_func_array(Object(Closure), Array) #4 C:\OSPanel\domains\test.loc\sys\CODOF\Router\Router.php(56): CODOF\Router\Router::_dispatch(Object(FastRoute\Dispatcher\GroupCountBased)) #5 C:\OSPanel\domains\test.loc\routes.php(892): CODOF\Router\Router::dispatch() #6 C:\OSPanel\domains\test.loc\index.php(22): require('C:\\OSPanel\\doma...' ) #7 {main} thrown in C:\OSPanel\domains\test.loc\sys\CODOF\User\Register.php on line 234 Need help --- Also I need to add any kind of **Honeypot** to Register page. Who can share working code?(blush)
edited Oct 24 at 8:32 am

Hi mate,


if your users are missing to use the Captcha it is maybe quite normal that you get a error message?


Because of the Honeypott - check it out mate: https://dev.to/felipperegazio/how-to-create-a-simple-honeypot-to-protect-your-web-forms-from-spammers--25n8


Kind regards, WebCrew smile


Hi mate, if your users are missing to use the Captcha it is maybe quite normal that you get a error message? **Because of the Honeypott - check it out mate:** https://dev.to/felipperegazio/how-to-create-a-simple-honeypot-to-protect-your-web-forms-from-spammers--25n8 Kind regards, WebCrew ;)

Join: Net-Twin Community

Visit my GitHub: @WebCrew

Hi


Yes, I believe a more suitable error response should be shown here instead of a php stacktrace.
We will fix this in the next version.


Thank you for helping improve our forum


Hi Yes, I believe a more suitable error response should be shown here instead of a php stacktrace. We will fix this in the next version. Thank you for helping improve our forum
Necessity is the mother of all inventions!

@admin

Solved it!!!!smile All works fine! No errors!


....\sys\CODOF\User\Register.php


Change code


            if (!$response->isSuccess()) {
$errors[] = "capcha entered was wrong";
}

to


            else {
$errors[] = "capcha entered was wrong";
}

Is it okay for the security?smile @admin

@admin Solved it!!!!8) All works fine! No errors! ....\sys\CODOF\User\Register.php Change code ```` if (!$response->isSuccess()) { $errors[] = "capcha entered was wrong"; } ```` to ```` else { $errors[] = "capcha entered was wrong"; } ```` Is it okay for the security?(wasntme) @admin
edited Nov 1 at 11:45 am
55
3
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft