#40675 [Opn]: Documentation for FILTER_VALIDATE_URL appears out of date

From: Date: Thu, 01 Mar 2007 03:09:03 +0000
Subject: #40675 [Opn]: Documentation for FILTER_VALIDATE_URL appears out of date
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969375694@lists.php.net to get a copy of this message
 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


Thread (5 messages)

« previous php.doc (#969375694) next »