Bug #53395 [NEW]: FILTER_VALIDATE_EMAIL return false on valid emails
| From: | edanpr at gmail dot com | Date: | Wed, 24 Nov 2010 11:58:10 +0000 |
| Subject: | Bug #53395 [NEW]: FILTER_VALIDATE_EMAIL return false on valid emails | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-156370@lists.php.net to get a copy of this message | ||
From:
Operating system: debian
PHP version: 5.3.3
Package: Unknown/Other Function
Bug Type: Bug
Bug description:FILTER_VALIDATE_EMAIL return false on valid emails
Description:
------------
In php 5.3.3 using filter_var to validate email (FILTER_VALIDATE_EMAIL)
that got more than one period (.) or dash (-) results in error while in
5.3.2 it didn't.
test@h--t.com will return false on 5.3.3 and true on 5.3.2
t..est@test.com will return false on 5.3.3 and true on 5.3.2
Test script:
---------------
<?
$adr1 = 't..est@test.com';
$adr2 = 'test@h--t.com';
var_dump(filter_var($adr1, FILTER_VALIDATE_EMAIL));
var_dump(filter_var($adr2, FILTER_VALIDATE_EMAIL));
Expected result:
----------------
string(15) "t..est@test.com"
string(13) "test@h--t.com"
Actual result:
--------------
bool(false)
bool(false)
--
Edit bug report at http://bugs.php.net/bug.php?id=53395&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53395&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53395&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53395&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=53395&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53395&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=53395&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=53395&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=53395&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=53395&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=53395&r=support
Expected behavior: http://bugs.php.net/fix.php?id=53395&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=53395&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=53395&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=53395&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53395&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53395&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=53395&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=53395&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=53395&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=53395&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=53395&r=mysqlcfg