From: botisdale at gmail dot com Operating system: win xp PHP version: 5.2.10 PHP Bug Type: Filter related Bug description: FILTER_VALIDATE_URL
Description: ------------ It seems that the scheme is always required for FILTER_VALIDATE_URL, whether or not FILTER_FLAG_SCHEME_REQUIRED is used - making the second flag redundant. Is this the expected behavior of FILTER_VALIDATE_URL? Does it never evaluate 'example.com' to true? --- >From manual page: function.filter-var --- Reproduce code: --------------- --- >From manual page: function.filter-var --- #1: <?php var_dump(filter_var('example.com', FILTER_VALIDATE_URL)); ?> #2: <?php var_dump(filter_var('example.com', FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)); ?> Expected result: ---------------- I'd expect to see: #1: string(11) "example.com" #2: bool(false) Actual result: -------------- #1: bool(false) #2: bool(false) -- Edit bug report at http://bugs.php.net/?id=49403&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49403&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49403&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49403&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49403&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49403&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49403&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49403&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49403&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49403&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49403&r=support Expected behavior: http://bugs.php.net/fix.php?id=49403&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49403&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49403&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49403&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49403&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49403&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49403&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49403&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49403&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49403&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49403&r=mysqlcfg