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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cross’s picture

There is small patch to fix it.

cross’s picture

forgot --no-prefix to git diff. There is fixed patch.

Berdir’s picture

Status: Active » Needs review

Setting status to needs review so that the patch is tested.

thedavidmeister’s picture

Issue summary: View changes
Status: Needs review » Needs work

This code doesn't exist in d8, so no need to bump the version.

Patch needs a re-roll:

tdm:d7 thedavidmeister$ git apply 818988_profile_fix_warning_0.patch 
error: profile/profile.pages.inc: No such file or directory

+ if (empty($field) && $name) {

Would the equivalent logic to what is being replaced not be empty($field->fid) rather than empty($field)?

moshnoi’s picture

Status: Needs work » Needs review
FileSize
1.16 KB

Re-roll patch.