#40675 [NEW]: Documentation for FILTER_VALIDATE_URL appears out of date
| From: | walter dot tom+php at gmail dot com | Date: | Thu, 01 Mar 2007 03:07:10 +0000 |
| Subject: | #40675 [NEW]: Documentation for FILTER_VALIDATE_URL appears out of date | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969375693@lists.php.net to get a copy of this message | ||
From: walter dot tom+php at gmail dot com
Operating system:
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: Documentation for FILTER_VALIDATE_URL appears out of date
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 bug report at http://bugs.php.net/?id=40675&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40675&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40675&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40675&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40675&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40675&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40675&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40675&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40675&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40675&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40675&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40675&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40675&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40675&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40675&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40675&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40675&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40675&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40675&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40675&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40675&r=mysqlcfg