Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a user profile (using the core Profile module), and after I made some changes and submitted the form to update my profile, I got this:
Fatal error: Cannot access empty property in /sites/all/modules/spam/modules/spam_user.inc on line 226
Comments
Comment #1
ebeyrent CreditAttribution: ebeyrent commentedThis fixes the issue:
Comment #2
ron_s CreditAttribution: ron_s commentedI wasn't able to get this to work using the code above. PHP doesn't like the "$user->$name" nomenclature in PHP 5.2.14. So instead I was able to get it to work like this, using a defined variable and the name of the variable in curly brackets:
Comment #3
gnassar CreditAttribution: gnassar commentedThe 5.x branch is no longer supported, as of a year or so back.
You probably want to use the 5.x-3.x-dev build if you're still using 5.x.
If you come up with a clean, simple patch for it that doesn't take much double-checking or support, it is also possible that one of us may be willing to commit it to that branch.
Comment #4
gnassar CreditAttribution: gnassar commented