Getting php error on new user registration

Patrick Fullick Posted in Technical Support 3 years ago

Our server logfile shows two PHP warnings (each with identical time stamps) every time a new user registers, as follows:

PHP Warning: Invalid argument supplied for foreach() in /home/inferent/scratchpad.inferentialfutures.com/actions/user/register.php on line 23
PHP Warning: Invalid argument supplied for foreach() in /home/inferent/scratchpad.inferentialfutures.com/actions/user/register.php on line 55

We have been unable to fully understand where / how this arises.

User registration is not affected - there is no error shown in OSSN itself.

Replies
gb Patrick Fullick Replied 3 years ago

Thanks @Michael, much appreciate that rapid and very helpful response.

German Michael Zülsdorff Replied 3 years ago

Yes, because you're using RemoveGenders and RemoveBirthdate.

The current registration code is assuming that gender and/or birthdate input is available - in your case it's not, that's why you're getting these warnings.
No need to worry, but it should be fixed with the next release (see https://github.com/opensource-socialnetwork/opensource-socialnetwork/pulls #2135 and #2136 and #2137

Thanks for providing a report with included error log AND sitename.