ID:               50158
 Comment by:       andrew dot nicols at luns dot net dot uk
 Reported By:      andrew dot nicols at luns dot net dot uk
 Status:           Open
 Bug Type:         Filter related
 Operating System: Debian
 PHP Version:      5.2.11
 New Comment:

Copy/paste bug on my behalf. The expected result is:

string(21) "[email protected]"
string(21) "[email protected]"
string(21) "[email protected]"


Previous Comments:
------------------------------------------------------------------------

[2009-11-12 14:56:05] andrew dot nicols at luns dot net dot uk

Description:
------------
The filter_var function, when used with FILTER_VALIDATE_EMAIL marks an
email address with an = in it as invalid.

According to RFCs 822, 2822 and 5322, = is a valid component to the
local-part of an e-mail address.

Reproduce code:
---------------
<?php    
    
$email_address = "[email protected]";    
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));    
                                                                
$email_address = "[email protected]";    
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));    
    
$email_address = "[email protected]";    
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));    
                                                                       

?>


Expected result:
----------------
string(21) "[email protected]"
string(21) "[email protected]"
string(21) "[email protected]"


Actual result:
--------------
bool(false)
string(21) "[email protected]"
string(21) "[email protected]"


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50158&edit=1

Reply via email to