Bug #61012 [Com]: filter_var don't pass valid email address
Edit report at https://bugs.php.net/bug.php?id=61012&edit=1
ID: 61012
Comment by: anon at anon dot anon
Reported by: sucotronic at gmail dot com
Summary: filter_var don't pass valid email address
Status: Not a bug
Type: Bug
Package: Mail related
Operating System: linux ubuntu 10.04
PHP Version: 5.3SVN-2012-02-08 (snap)
Block user comment: N
Private report: N
New Comment:
I also get false, using PHP 5.3.2/Windows.
But according to the change log, FILTER_VALIDATE_EMAIL was overhauled in PHP 5.3.3, in July 2010,
after this bug report: https://bugs.php.net/bug.php?id=49576
Previous Comments:
------------------------------------------------------------------------
[2012-02-08 17:55:28] sucotronic at gmail dot com
More exactly, my version is: 5.3.2-1ubuntu4.11
------------------------------------------------------------------------
[2012-02-08 16:49:29] rasmus@php.net
Unable to reproduce in 5.3/5.4:
php > echo filter_var("+4654651651@test.com", FILTER_VALIDATE_EMAIL);
+4654651651@test.com
Make sure you are actually trying this in 5.3. This may have been broken in 5.2,
but was fixed years ago in 5.3.
------------------------------------------------------------------------
[2012-02-08 14:58:45] sucotronic at gmail dot com
Description:
------------
If you use the filter_var function to test an email address, and the address
starts with the '+' sign, it's marked as invalid, but it isn't.
Test script:
---------------
filter_var("+4654651651@test.com", FILTER_VALIDATE_EMAIL)
Expected result:
----------------
Return the string and not false.
Actual result:
--------------
false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61012&edit=1
Thread (6 messages)