atvptulasi / moodle-google

Automatically exported from code.google.com/p/moodle-google
Other
0 stars 0 forks source link

Critical exception in author->get_name if from header is missing; should display 'unknown sender' #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Receive message without 'from' header.
2. Gmail block message preview stops working.

What is the expected output? What do you see instead?

Expected: author showed display 'Unknown Sender' (the way it would in Gmail). 
This exception does not appear to be caught and handled properly causing the 
page not to display.

What version of the product are you using? On what operating system? Whatever 
version comes with Moodle 2.2.3.

Please provide any additional information below.

Line 193 in block_gmail.php is causing an exception if the message to be 
displayed does not have a from header.
http://code.google.com/searchframe#IOSpHuNFb7w/trunk/blocks/gmail/block_gmail.ph
p&l=193

The from hander is not required when sending to Gmail / Google. Gmail displays 
'unknown sender' in these situations. The exception needs to be handled so that 
if no from header is available (and as such the first name / last name cannot 
be parsed) either the return-path is displayed or 'unknown sender' (the way it 
is in Gmail).

Original issue reported on code.google.com by ve...@google.com on 16 May 2012 at 6:34