I get a notice in the _password_policy_constraint_validate() function when $account->roles is not defined. Patch to follow.

Files: 
CommentFileSizeAuthor
#1 password_policy-roles_notice-1800280-1.patch623 bytesbdlangton
PASSED: [[SimpleTest]]: [MySQL] 335 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new623 bytes
PASSED: [[SimpleTest]]: [MySQL] 335 pass(es).
[ View ]

Here is the patch.

Simple enough patch, but when would $account->roles not be defined?

Good question. It actually may never happen in a standard Drupal install, it might just be something with my site that was causing the problem.

Title:Notice: Undefined property: stdClass::$roles in _password_policy_constraint_validate()Notice when $account->roles is not set
Status:Needs review» Fixed

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.