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

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


bdlangton’s picture

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

Here is the patch.

erikwebb’s picture

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

bdlangton’s picture

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.

erikwebb’s picture

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.