Bug #61012 [Nab]: filter_var don't pass valid email address
| From: | sucotronic at gmail dot com | Date: | Thu, 09 Feb 2012 08:43:01 +0000 |
| Subject: | Bug #61012 [Nab]: filter_var don't pass valid email address | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167333@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61012&edit=1
ID: 61012
User updated by: sucotronic at gmail dot com
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:
Ok, I found it at: https://bugs.php.net/bug.php?id=49576 fixed in
5.3.3 release
and open a bug in ubuntu to request to update it
(https://bugs.launchpad.net/ubuntu/+source/php5/+bug/929387). Thanks for help.
Previous Comments:
------------------------------------------------------------------------
[2012-02-08 18:58:20] rasmus@php.net
Yes, this was fixed in July 2010 in 5.3.3.
------------------------------------------------------------------------
[2012-02-08 18:12:10] anon at anon dot anon
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
------------------------------------------------------------------------
[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