Issue Details (XML | Word | Printable)

Key: MDL-10384
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Poltawski
Reporter: Tatsuya Shirai
Votes: 0
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Recipient names become always "Array" in message feature.

Created: 09/Jul/07 12:28 PM   Updated: 01/Apr/09 03:56 AM
Return to search
Component/s: Messages
Affects Version/s: 1.8.1
Fix Version/s: 1.8.9, 1.9.5

Environment: Multi-bytes character-set environment.

URL: http://moodle.org/mod/forum/discuss.php?d=75226#p336434
Participants: Dan Poltawski, Petr Skoda and Tatsuya Shirai
Security Level: None
QA Assignee: Petr Skoda
Resolved date: 25/Mar/09
Affected Branches: MOODLE_18_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
function email_to_user() in lib/moodlelib.php

for example, followings are header of received email.
--------------------------
  (OK) To: ??? ??? <shirai.shirai@nifty.com>
  (NG) To: Array <shirai.shirai@nifty.com>
--------------------------

foreach ($mail->ReplyTo as $key => $rt) { //ReplyTo Names
        // $mail->ReplyTo[$key][1] = $textlib->convert($rt, 'utf-8', $mail->CharSet); : original
        $mail->ReplyTo[$key][1] = $textlib->convert($rt[1], 'utf-8', $mail->CharSet); : modified by shirai
}
$mail->Subject = $textlib->convert($mail->Subject, 'utf-8', $mail->CharSet); //Subject
foreach ($mail->to as $key => $to) {
        // $mail->to[$key][1] = $textlib->convert($to, 'utf-8', $mail->CharSet); //To Names : original
        $mail->to[$key][1] = $textlib->convert($to[1], 'utf-8', $mail->CharSet); //To Names : modified by shirai
}
------------------------------
need to change convert($rt, ...) to convert($rt[1], ...) , convert($to, ...) to convert($to[1], ...).
since $rt and $to are array. $to[0] is email address, $to[1] is full name of recipient


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Tatsuya Shirai added a comment - 03/Dec/07 06:05 PM
This mistake is very easy mistake.
Please correct CVS.

Dan Poltawski added a comment - 25/Mar/09 06:30 AM
Thanks for the fix! Sorry this took so long to get reviewed.

Just tested this out and its clearly an issue - I will commit to CVS tomorrow (after the current test/QA freeze ends)


Dan Poltawski added a comment - 25/Mar/09 06:20 PM
Many thanks, i've fixed this in CVS

Petr Skoda added a comment - 01/Apr/09 03:56 AM
thanks