php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46918 imap_rfc822_parse_adrlist host part not filled in correctly
Submitted: 2008-12-21 17:40 UTC Modified: 2008-12-24 11:25 UTC
From: ben at altesco dot nl Assigned:
Status: Closed Package: IMAP related
PHP Version: 5.2.8 OS: FreeBSD 7
Private report: No CVE-ID: None
 [2008-12-21 17:40 UTC] ben at altesco dot nl
Description:
------------
Since upgrading from php 5.2.6 to php 5.2.8 I have a problem with 
imap_rfc822_parse_adrlist. When I run the example given on the manual 
page at http://nl3.php.net/imap_rfc822_parse_adrlist, the host part 
sometimes returns junk.


Reproduce code:
---------------
$adds = 'ian eiloart <iane@example.ac.uk>,
      shuf6@example.ac.uk,
      blobby,
      "ian,eiloart"<ian@example.ac.uk>,
      <@example.com:foo@example.ac.uk>,
      foo@#,
      ian@-example.com,
      ian@one@two';
$add_arr = imap_rfc822_parse_adrlist($adds, 'example.com');
var_export ($add_arr);

Expected result:
----------------
...
2 =>
class stdClass {
  var $mailbox = 'blobby';
  var $host = 'example.ac.uk';
},
...


Actual result:
--------------
...
2 =>
stdClass::__set_state(array(
   'mailbox' => 'blobby',
   'host' => 'p?a(',
)),
...


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-24 11:25 UTC] felipe@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 11:01:28 2024 UTC