new StdClass();

CommentFileSizeAuthor
user.module_59.patch775 bytesRobRoy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Crell’s picture

Does not defining the object before defining a property of it cause an E_NOTICE error? If so, then +1 RTBC. (The code can't get much simpler.) If not, -1 unnecessary code.

Rob, please confirm. :-)

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Every variable should be initialized. Just because we are coding in PHP doesn't mean we should be sloppy.

Don't post patches as ready to commit without review.

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)