ID:              40675
 User updated by: walter dot tom+php at gmail dot com
 Reported By:     walter dot tom+php at gmail dot com
 Status:          Open
 Bug Type:        Documentation problem
-PHP Version:     Irrelevant
+PHP Version:     5.2.1
 New Comment:

Oops, for some reason lost the version number when I first submitted.


Previous Comments:
------------------------------------------------------------------------

[2007-03-01 03:07:10] walter dot tom+php at gmail dot com

Description:
------------
The current documentation for FILTER_VALIDATE_URL
(http://www.php.net/filter) mentions flags for
FILTER_FLAG_HOST_REQUIRED and FILTER_FLAG_SCHEME_REQUIRED, which
suggest that an input that doesn't include a host or scheme such as a
relative URL SHOULD validate as long as it doesn't include those flags.
However they do not.




Reproduce code:
---------------
$var = filter_var('/mypath.html', FILTER_VALIDATE_URL);
$var = filter_var('google.com', FILTER_VALIDATE_URL);

Expected result:
----------------
Both return false, however given the current documentation, one would
expect them to return true.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40675&edit=1

Reply via email to