|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51780 FILTER_VALIDATE_URL should allow domain name with '-'
Submitted: 2010-05-10 05:03 UTC Modified: 2010-05-10 05:38 UTC
From: srwang at pixnet dot tw Assigned:
Status: Duplicate Package: Filter related
PHP Version: 5.3.2 OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
20 + 50 = ?
Subscribe to this entry?

 [2010-05-10 05:03 UTC] srwang at pixnet dot tw
FILTER_VALIDATE_URL should allow host name with '-'

Test script:
var_dump(filter_var('', FILTER_VALIDATE_URL));
var_dump(filter_var('', FILTER_VALIDATE_URL));

Expected result:
string(21) ""
string(22) ""

Actual result:
string(21) ""


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-10 05:39 UTC]
-Status: Open +Status: Duplicate
 [2010-05-10 05:39 UTC]
This was reported and fixed before.  Will be in the next release.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Sep 29 21:05:53 2022 UTC