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.
If you try get page like http://localhost/profile/profile_name and "profile_name" field not exist, you will get php warnings showed to users.
Notice: Trying to get property of non-object in profile_browse() (line 18 of /var/www/drupal/modules/profile/profile.pages.inc).
Notice: Trying to get property of non-object in profile_browse() (line 89 of /var/www/drupal/modules/profile/profile.pages.inc).
it's a bit confusing to users.
apache2 + php(5.3.2-1ubuntu4.2). Drupal7 from cvs.
Comment | File | Size | Author |
---|---|---|---|
#5 | reroll_patch-818988-5.patch | 1.16 KB | moshnoi |
#2 | 818988_profile_fix_warning.patch | 1.09 KB | cross |
#1 | 818988_profile_fix_warning.patch | 1.09 KB | cross |
Comments
Comment #1
cross CreditAttribution: cross commentedThere is small patch to fix it.
Comment #2
cross CreditAttribution: cross commentedforgot --no-prefix to git diff. There is fixed patch.
Comment #3
BerdirSetting status to needs review so that the patch is tested.
Comment #4
thedavidmeister CreditAttribution: thedavidmeister commentedThis code doesn't exist in d8, so no need to bump the version.
Patch needs a re-roll:
+ if (empty($field) && $name) {
Would the equivalent logic to what is being replaced not be empty($field->fid) rather than empty($field)?
Comment #5
moshnoi CreditAttribution: moshnoi commentedRe-roll patch.