SMFHacks.com

Badge Awards => Support => Topic started by: shuban on July 04, 2016, 12:54:25 am

Title: Possible bug
Post by: shuban on July 04, 2016, 12:54:25 am
When getting a notification through email for a topic reply, it states:

A reply has been posted to a topic you are watching by Award System.

Is this supposed to happen?
Title: Re: Possible bug
Post by: SMFHacks on July 04, 2016, 11:14:00 am
It shouldn't but it it is a bug with the SMF code in the sendpm function
Mainly the line $user_info['name'] = $from['name'];

Code: [Select]
function sendpm($recipients, $subject, $message, $store_outbox = false, $from = null)
{
global $db_prefix, $ID_MEMBER, $scripturl, $txt, $user_info, $language, $func, $modSettings;

// Initialize log array.
$log = array(
'failed' => array(),
'sent' => array()
);

if ($from === null)
$from = array(
'id' => $ID_MEMBER,
'name' => $user_info['name'],
'username' => $user_info['username']
);
// Probably not needed.  /me something should be of the typer.
else
$user_info['name'] = $from['name'];
Title: Re: Possible bug
Post by: shuban on July 04, 2016, 11:15:29 am
How do you suppose I should tackle this?
Title: Re: Possible bug
Post by: SMFHacks on July 04, 2016, 11:23:58 am
I would remove this line. Doesn't seem like it is used at all
Code: [Select]
// Probably not needed.  /me something should be of the typer.
else
$user_info['name'] = $from['name'];