Warning messages
Jboo - March 24, 2008 - 18:11
| Project: | User Relationships |
| Version: | 5.x-2.8 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
When adding a relationship on the settings page I get the following warning:
warning: Invalid argument supplied for foreach() in /home/brew/public_html/site/modules/user_relationships/plugins/user_relationship_implications/user_relationship_implications.module on line 327.
I also get this error on the activity settings page:
Fatal error: Call to undefined function: user_relationships_relationship_types_load() in /home/brew/public_html/site/modules/activity/contrib/user_relationshipsactivity/user_relationshipsactivity.module on line 31
Any help would be appreciated,
Thanks.

#1
Ok Im getting the same error,
warning: Invalid argument supplied for foreach() in /home/site/public_html/site/modules/user_relationships/plugins/user_relationship_implications/user_relationship_implications.module on line 327.
#2
fixed in 2.8
#3
After updating to 2.8, once I've created a relationship and then go to edit that relationship type I have the following warnings:
* warning: Invalid argument supplied for foreach() in /home/brew/public_html/site/modules/user_relationships/plugins/user_relationship_implications/user_relationship_implications.module on line 92.
* warning: Invalid argument supplied for foreach() in /home/brew/public_html/site/modules/user_relationships/plugins/user_relationship_implications/user_relationship_implications.module on line 96.
Thanks for any more help.
#4
#2 above states "fixed in 2.8", but it doesn't state if both the warning AND the error in the original post were fixed or if only the warning in #1 was fixed. I only mention this because I'm using 2.8 and today I received the line 31 error identified in the original post.
Here's what I did for the error to occur.
I enabled the "Activity" module along with its associated:
Comment Activity
Node Activity
and
User Relationships Activity
I then clicked on my site's "Activity" settings from the Admin Menu which takes me to:
http://www.wellnesscorps.com/admin/settings/activity
The error then occured:
Here's what I did for the error to disappear.
I un-enabled the Activity module's associated:
User Relationships Activity
I then clicked on my site's "Activity" settings from the Admin Menu which takes me to:
http://www.wellnesscorps.com/admin/settings/activity
The error no longer shows up.
Should this issue's "Project" be changed to "Activity" instead of "User Relationships"? I'm using Activity 5.x-3.0-beta which is the recommended Activity version per:
http://drupal.org/project/activity
Thanks in advance for any help,
Walt
#5
I see that this error is fixed in the HEAD (or -dev) version of Activity. They haven't pushed it to a release yet.
I do believe this should be in Activity though.
#6
Thanks for your help sprsquish!
Yes, the the line 31 error identified in the original post as well as my post (#2 above) is fixed in Activity 5.x-3.x-dev per: http://drupal.org/node/244126
However, Jboo's post in #3 above included an additional User Relationships issue for lines 92 & 96, and I found another related issue for lines 92 & 96 here: http://drupal.org/node/242405
Therefore, I'm resetting the "Project" classification from "Activity" to "User Relationships", version 2.8.
If the issue for lines 92 & 96 has been fixed, feel free to reset as "fixed". Thanks!
#7
Yep.. those were unrelated to Activity and duplicates of this ticket: http://drupal.org/node/232903.
#8
Automatically closed -- issue fixed for two weeks with no activity.