Bug #14575: inappropriate pass by reference?

From: Date: Tue, 18 Dec 2001 12:02:01 +0000
Subject: Bug #14575: inappropriate pass by reference?
Groups: php.dev 
Request: Send a blank email to php-dev+get-74233@lists.php.net to get a copy of this message
From: krei+public@it.net.au Operating system: Linux 2.4.10 (Debian) PHP version: 4.1.0 PHP Bug Type: IMAP related Bug description: inappropriate pass by reference? 4.1.0RC2 "array imap_rfc822_parse_adrlist (string address, string default_host)" The address argument appears to be erroneously passed by reference, and is subsequently mutilated by the function. Hence the following code produces unexpected results. Any subsequent call to imap_rfc822_parse_adrlist() will fail. (This causes major problems with IMP 2.2.6) $a="aaaaa <a@a.a>"; $b="bbbbb <b@b.b>"; $c=$a; imap_rfc822_parse_adrlist($a, "troz"); dump("a:$a\nb:$b\nc:$c\n"); output is: a:aaaaa^@<a@a.a> b:bbbbb <b@b.b> c:aaaaa^@<a@a.a> Note the null character replacing the space between the personal name and mailbox name. -- Edit bug report at: http://bugs.php.net/?id=14575&edit=1

« previous php.dev (#74233) next »