Bug #54233 [Opn]: PHP Filter email doesn't work properly
| From: | flood at itnews-bg dot com | Date: | Fri, 11 Mar 2011 21:44:22 +0000 |
| Subject: | Bug #54233 [Opn]: PHP Filter email doesn't work properly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-159413@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54233&edit=1
ID: 54233
User updated by: flood at itnews-bg dot com
Reported by: flood at itnews-bg dot com
Summary: PHP Filter email doesn't work properly
Status: Open
Type: Bug
Package: *General Issues
Operating System: Slackware 13x86_64
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
Hey,
It seems the filter function is not working some times.
You can see in the test script that the email is returned as a valid
though it's not quite.
Previous Comments:
------------------------------------------------------------------------
[2011-03-11 22:43:36] flood at itnews-bg dot com
Description:
------------
Hey,
It seems the filter function is not working some times.
You can see in the test script that the email is returned as a valid
though it's not quite.
Testing script:
<?php
$email =
"?â?â°?âaâ¬?â?S?âaâ¬_?âaâ¬??âaâ¬Â¦?â??'
this.is.a.testing@email.com";
var_dump(filter_var(filter_var($email,FILTER_SANITIZE_EMAIL),
FILTER_VALIDATE_EMAIL));
?>
Test script:
---------------
<?php
$email =
"?â?â°?âaâ¬?â?S?âaâ¬_?âaâ¬??âaâ¬Â¦?â??'
this.is.a.testing@email.com";
var_dump(filter_var(filter_var($email,FILTER_SANITIZE_EMAIL),
FILTER_VALIDATE_EMAIL));
?>
Expected result:
----------------
It should return a false boolean. This is not a valid email.
Actual result:
--------------
Returns an invalid email:
???a??S?a_?a??a???'this.is.a.testing@email.com
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54233&edit=1