- Issue created by @kenorb
- Assigned to Shreya_98
- last update
about 1 year ago 9,628 pass - @shreya_th opened merge request.
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 5:20am 18 October 2023 - 🇮🇳India Shreya_98
Hi @kenorb,
I have fixed this issue i.e. " Warning: foreach() argument must be of type array|object " and also created MR for this. Kindly review the changes.Thank you.
- 🇺🇸United States rishi kulshreshtha
I have attached a backport patch for the 1.x version.
- Status changed to Needs work
9 months ago 2:40pm 1 March 2024 - 🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium
What version are you on? When I look at the code I see this is already fixed.
// Get the IDs from the 'group_roles' field, without loading the roles. if ($membership = $this->groupMembershipLoader->load($group, $account)) { foreach ($membership->getGroupRelationship()->group_roles as $group_role_ref) { $ids[] = $group_role_ref->target_id; } }
The MR does nothing but make the above more verbose.
- 🇺🇸United States wylbur Minneapolis, Minnesota, USA
I found this issue from a google search for the error message. My issue persisted, even after applying the patch. Since I was testing patches, I started over with a fresh install on a clean D10 site. No issues after the fresh install.
I received that error after trying to create new groups. The install process never completed after each group install. Each time I ran the install, it would return to the group page, with no installs, and the same number of error messages for each attempt I had made. It seemed clear that the system was creating groups, but hanging on each install. Each of these hung installs created another entity that caused an error. In my case the patch never resolved the issue or suppressed the errors.
Not a solution, but hope this helps someone else trying to diagnose this.