simplenews_nodeapi uses $user, but there's a missing global $user.

patch attached.

CommentFileSizeAuthor
#2 simplenews.356784.patch1.83 KBsutharsan
#1 get_rid_of_notices.patch1.88 KBAnonymous (not verified)
missing_user.patch711 bytesAnonymous (not verified)

Comments

Anonymous’s picture

Title: missing global $user causes notices » get rid of notices in simplenews.module
StatusFileSize
new1.88 KB

patch now fixes a few spots that need to check if variables exist, and passes the language object to user_mail_tokens, not just the language string.

sutharsan’s picture

StatusFileSize
new1.83 KB

I reworked the patch a bit making simplenews_mail_tokens() capable of retrieving $name from both newsletter and node objects.
Please test.

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

tested the patch, works for me, RTBC.

sutharsan’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the code. Patch committed.

Status: Fixed » Closed (fixed)

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