From: ("")
Date:  22 Feb 2018 03:53:22 Hong Kong Time

[PEAR-BUG] Bug #21136 [Com]: Empty header value causes notice

NNTP-Posting-Host:  null

Edit report at

 ID:               21136
 Comment by:       slgundam at gmail dot com
 Reported By:      jorrit at ncode dot nl
 Summary:          Empty header value causes notice
 Status:           Open
 Type:             Bug
 Package:          Mail_mimeDecode
 Operating System: Linux
 Package Version:  1.5.6
 PHP Version:      Irrelevant
 Roadmap Versions: 
 New Comment:

"isset($hdr_value[0]) && " should fix this as well

Previous Comments:

[2016-10-25 03:04:21] jorrit

On line 492 of mimeDecode.php the first space of the header value is
removed. However, I encounter mails that have an empty $hdr_value so
checking $hdr_value[0] causes a 'Uninitialized string offset: 0' notice
in PHP 7. The addition of a simple '!empty($hdr_value) &&  ' would fix

Test script:

Expected result:
No notices

Actual result:
The notice mentioned above.


Edit this bug report at