Hi there

One of my users is experiencing the current errors when adding relationships:

Invalid argument supplied for foreach() in /sites/all/modules/user_relationships/user_relationships_api/user_relationships_api.api.inc on line 36.

Then...

Attempt to assign property of non-object in /home/adamand/public_html/sites/all/modules/user_relationships/user_relationship_mailer/user_relationship_mailer.module on line 23.

This first occurred about 5 days ago with an anonymous user, now coming up with a registered user associated. Been happening once a day at different times for last few days.

Any suggestions / assistance most appreciated! Thanks!

Comments

antlib’s picture

It would seem this is happening to all users - so isn't specific to this visitor.

This one has me stumped - a random php error from seemingly nowhere! o_O

antlib’s picture

*Bump*

robby.smith’s picture

I just started getting this error message today.

EDITED: please refer to post below.
@antlib - do you have UR-Rules module enabled? or are there possibly other reasons for this warning to show?

robby.smith’s picture

I found the root cause for my case at least:
I have a rule with action "send a message to a user" for event "user has received a request".
The warning shows when the user who was suppose to receive the email had an invalid email address.

I'm not sure how to prevent this warning as I don't think it is necessary to show a scary msg to a user if the email address of another user is fake =(

j0k3z’s picture

+1 - is it possible to hide this output? It also happens on my site when a user has an invalid email address

alex.k’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry but I can't reproduce this. Can you post the exact steps and which user has an invalid email ( and what does invalid mean). Please do this using the current -dev release, not RC3. Thanks.

robby.smith’s picture

I am no longer getting any errors.
Is anyone else still seeing this?

ajayg’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I haven't see this either. Perhaps it got fixed in Rc4? So closing this as can not reproduce.

njathan’s picture

Version: 6.x-1.0-rc3 » 6.x-1.x-dev
Status: Closed (cannot reproduce) » Active

I get the exact same warning with the latest dev (2010-Oct-18 build). I have the following UR modules enabled - UR-API, UR-Implications, UR-Mailer, UR-Panels Visibility, UR-UI, UR-Views.

I get the warning when i try adding a new relationship type. When i disable the UR-Implications sub module, this warning disappears (hoping this would help someone reproduce the problem...)

alex.k’s picture

Version: 6.x-1.x-dev » 6.x-1.0-rc3
Status: Active » Closed (cannot reproduce)

Your issue is not related to UR-Mailer, so it's different. However the bug you report is valid, I opened #969164: UR-Implications throws PHP warnings

chak_boss’s picture

Title: Invalid argument supplied for foreach() in /sites/all/modules/user_relationships/user_relationships_api » Invalid argument supplied for foreach() in /sites/all/modules/xmpp framework/xmpp_relationships
Project: User Relationships » XMPP Framework
Version: 6.x-1.0-rc3 » 6.x-2.1

Hi., when i install xmpp framework module, In xmpp relationships sub-module is not enable due to User_relationships_api (missing).. I have converted module from 6.x into 7.x using coder upgrade module. Can any one give solution for this.