"Attempt to assign property of non-object" in profile.module
amariotti - September 18, 2008 - 14:58
| Project: | Drupal |
| Version: | 5.10 |
| Component: | profile.module |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I came into work this morning to this message on my website.
warning: Attempt to assign property of non-object in /srv/www/htdocs/drupal_root/modules/profile/profile.module on line 531.
We're using LDAP to authenticate to our site and haven't had any problems for the 3 weeks that the site has been up and running.
Watchdog reports nothing really suspicious except for a cron run right before it happened. Cron is set to run every hour so I'm not sure why it would all of the sudden do this. Anyone have ideas or know where I can look to figure out why this is happening? Thanks!

#1
While trying to solve the issue I went in and delete some of the users that didn't appear to have some of the LDAP data to map over to the profile fields. Issue still remains.
#2
Well, the issue is fixed, but I'm not sure if what I did to fix it was correct or not. There was a strange UID of "0" in my profile_values table that was acting as if it was independent from the rest of the data. When I deleted a profile field it retained the field under the uid "0." So I deleted one of the profile fields and one of the 4 errors mentioned above disappeared. When that happened there were 3 fields left assigned to uid "0" so I deleted them (after dumping my table, of course) and the error appears to be non-existent.
Hopefully this will help someone else down the road that might run into the same issue. Is uid "0" common to have in the users table and profile_values table?
#3
#4
#5
Automatically closed -- issue fixed for two weeks with no activity.