Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Update library/Zend/Mail/Header/AbstractAddressList.php #3789

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

axzx commented Feb 15, 2013

because

[ErrorException]                                                             
  Notice: Undefined offset: 1 in vendor/zendframe  
  work/zendframework/library/Zend/Mail/Header/AbstractAddressList.php line 46
Update library/Zend/Mail/Header/AbstractAddressList.php
because

[ErrorException]                                                             
  Notice: Undefined offset: 1 in vendor/zendframe  
  work/zendframework/library/Zend/Mail/Header/AbstractAddressList.php line 46

@mwillbanks mwillbanks commented on the diff Feb 15, 2013

library/Zend/Mail/Header/AbstractAddressList.php
@@ -43,7 +43,9 @@ public static function fromString($headerLine)
{
$decodedLine = iconv_mime_decode($headerLine, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8');
// split into name/value
- list($fieldName, $fieldValue) = explode(': ', $decodedLine, 2);
+ list($fieldName, $fieldValue) = explode(':', $decodedLine, 2);
+ $fieldName = \trim($fieldName);
@mwillbanks

mwillbanks Feb 15, 2013

Contributor

There is no need to state a \ for a global function name. trim() itself will work.

Contributor

mwillbanks commented Feb 15, 2013

Please see comment on the change as well as supply a unit test for this behavior.

@ghost ghost assigned ezimuel Feb 15, 2013

weierophinney added a commit that referenced this pull request Feb 19, 2013

[#3789] Added test verifying issue
- Added test verifying issue presented in #3789

weierophinney added a commit that referenced this pull request Feb 19, 2013

@ghost ghost assigned weierophinney Feb 19, 2013

Contributor

axzx commented Feb 20, 2013

thanks a lot
👍

weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015

weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015

weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015

weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment