|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79802 VALIDATE_EMAIL has another behaviour as SANITIZE_EMAIL
Submitted: 2020-07-07 07:20 UTC Modified: -
From: Assigned:
Status: Open Package: Filter related
PHP Version: Irrelevant OS: Debian 10.4
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-07-07 07:20 UTC]
In all PHP Versions except 5.3.2 the following Script will return false for FILTER_VALIDATE_EMAIL while FILTER_SANITIZE_EMAIL does NOTHING to the input email.

While the Provided email is a valid return path, i excpect that VALIDATE_EMAIL will return the string provided and not false.

Test script:

$email = '';
var_dump(\filter_var($email, FILTER_VALIDATE_EMAIL));
var_dump($email === \filter_var($email, FILTER_SANITIZE_EMAIL));

Expected result:
string(89) ""

Actual result:


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Oct 24 04:01:23 2020 UTC