No Code Attached Yet Information Required bug
avatar avjoomla
avjoomla
20 Jun 2024

Steps to reproduce the issue

Set up a multi language Joomla 5.1 website
Enable User Registration
In Com User.
Set compontent option 'Frontend Language' to hide.
Set compoonent option 'New User Account Activation' to yes.
Try to register a new user in Frontend.

Expected result

User is registered and mail with activation link is send

Actual result

Fatal Error: Joomla\Registry\Registry::loadArray(): Argument #1 ($array) must be of type array, stdClass given, called in libraries/src/User/User.php on line 666

System information (as much as possible)

Joomla 5, php 8.2

Additional comments

I think the problem is as follows.
In this case, the submitted form does not contain params
In this case components/com_users/src/Model/RegistrationModel.php function getData() adds params to the data array.
This params are of type stdClass
On this data array, components/com_users/src/Model/RegistrationModel.php function function register($temp) calls $user->bind($data) which expects the params to by of type array.
If params are submitted with the registration form, they are of type array.

avatar avjoomla avjoomla - open - 20 Jun 2024
avatar avjoomla avjoomla - change - 20 Jun 2024
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jun 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Jun 2024
avatar chmst chmst - change - 21 Jun 2024
Labels Added: bug
avatar chmst chmst - labeled - 21 Jun 2024
avatar brianteeman
brianteeman - comment - 1 Aug 2024

Unable to replicate

avatar Quy Quy - change - 1 Aug 2024
Labels Added: Information Required
avatar Quy Quy - labeled - 1 Aug 2024
avatar Quy Quy - change - 11 Aug 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-08-11 18:47:57
Closed_By Quy
avatar Quy Quy - close - 11 Aug 2024

Add a Comment

Login with GitHub to post a comment