I found that when a user created an account by logging in for the first time via openID three notices were displayed.

Notice: Undefined index: values in openid_form_user_register_alter() (line 132 of /Path/To/Drupal/modules/openid/openid.module).
Notice: Undefined index: values in openid_form_user_register_alter() (line 133 of /Path/To/Drupal/modules/openid/openid.module).
Notice: Undefined index: values in openid_form_user_register_alter() (line 140 of /Path/To/Drupal/modules/openid/openid.module).

This patch prevents that from happening. I don't think it breaks anything.

This patch just changes one test performed in openid_form_user_register_alter().

CommentFileSizeAuthor
openID-prevent-php-notices.patch918 bytestizzo

Comments

tizzo’s picture

Issue tags: +Quick fix

Marking this Quick Fix at Crell's recommendation. Will wait on this patch for the patch I'm working on for DBTNG here - #394488.

cburschka’s picture

Status: Needs review » Needs work

Warning: isset($variable['key_one']['key_two']) /will/ trigger a notice if $variable['key_one'] isn't set. So be sure $_SESSION['openid'] is always defined.

I would suggest

+  if (isset($_SESSION['openid']) && isset($_SESSION['openid']['values'])) {
c960657’s picture

Status: Needs work » Closed (duplicate)