- Issue created by @gbirch
- last update
over 1 year ago 20 pass - 🇮🇳India abhishek_virasat
@gbirch, can you please share step to reproduce. that I verify your patch , its working or not.
- 🇺🇸United States gbirch
As noted in the issue description, I was unclear at the time of the report about the circumstances in which the passed user might be anonymous - I had the error, but not a lot of detail about the circumstances in which it was triggered. So I simply wrote a patch that tested for the existence of an array before calling a function that requires an array - pure defensive programming. But I now know that it can happen when using the Masquerade module and a user who has masqueraded now de-masquerades. Why this should be true I have not chased down, but honestly, this patch simply makes the code work when an anonymous user object is passed, which seems like good coding practice to me.