On a fresh install, I submitted the form at admin/build/path/pathauto
and got:

# notice: Undefined property: stdClass::$mail in token-6--1/token_user.inc on line 35.
# notice: Undefined property: stdClass::$created in token-6--1/token_user.inc on line 36.
# notice: Undefined property: stdClass::$created in token-6--1/token_user.inc on line 37.
# notice: Undefined property: stdClass::$access in token-6--1/token_user.inc on line 38.
# notice: Undefined property: stdClass::$access in token-6--1/token_user.inc on line 39.
# notice: Undefined property: stdClass::$timezone in token-6--1/token_user.inc on line 40.

Comments

beginner’s picture

Title: Undefined properties notices » Undefined properties notices in token_user.inc
dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

I think this is fixed with the latest code. Could you please re-confirm this bug?

manischewitzbacon’s picture

I just got this same error on a fresh install of the module from HEAD

notice: Undefined property: stdClass::$mail in modules/contrib/token/token_user.inc on line 40.
notice: Undefined property: stdClass::$created in modules/contrib/token/token_user.inc on line 41.
notice: Undefined property: stdClass::$created in modules/contrib/token/token_user.inc on line 42.
notice: Undefined property: stdClass::$access in modules/contrib/token/token_user.inc on line 43.
notice: Undefined property: stdClass::$access in modules/contrib/token/token_user.inc on line 44.
notice: Undefined property: stdClass::$timezone in modules/contrib/token/token_user.inc on line 45.

the block of errors were repeated twice, (I'm guessing once for user1 contact form, and once for user1...)

sagich’s picture

subscribe

dave reid’s picture

Something is obviously not provided the full user object to the token functions then. Can you add this line to token_user.inc right before line 40?

if (!isset($account->mail) || !isset($account->created) || !isset($account->access)) {
  echo "Caught invalid user object.";
  var_export($account);
  $backtrace = debug_backtrace();
  print_r($backtrace);
  die();
}
dave reid’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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