ID: 50204 User updated by: brian dot sulzen at aescreations dot com Reported By: brian dot sulzen at aescreations dot com Status: Bogus Bug Type: Filter related Operating System: FreeBSD 6.3 PHP Version: 5.2.11 New Comment:
Was not sure if it was a bug or not. All I know is before the php portupgrade, addresses without a top level domain would not pass validation. Previous Comments: ------------------------------------------------------------------------ [2009-11-17 16:06:02] [email protected] That's not a bug. It only validates that the address looks valid, not whether the email address actually exists. email addresses without a tld are perfectly valid. Try sending an email to: r...@localhost for example. Or on my personal server ras...@colo works. Same for Intranet applications. You can have all sorts of valid email addresses that have no TLD. ------------------------------------------------------------------------ [2009-11-17 16:01:21] brian dot sulzen at aescreations dot com Description: ------------ FILTER_VALIDATE_EMAIL is passes addresses with out top level domain (i.e., .com, .net, etc). Reproduce code: --------------- <?php $email_address = "test2_m...@example"; var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); $email_address = "[email protected]"; var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); $email_address = "[email protected]"; var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); ?> Expected result: ---------------- bool(false) string(21) "[email protected]" string(21) "[email protected]" Actual result: -------------- string(18) "test2_m...@example" string(21) "[email protected]" string(21) "[email protected]" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50204&edit=1
