From: Operating system: Linux 2.6.25.20 (openSuse 11.0) PHP version: 5.3.2 Package: Filter related Bug Type: Bug Bug description:FILTER_VAR returns FALSE on valid-Urls containing a minus sign
Description:
------------
PHP 5.3.2 (cli)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans
FILTER_VAR returns false on valid URL's such "http://www.sky-bizz.com".
Without minus-sign it will return the string as positive result.
In Bug-Search I found the hint, that it already would be fixed in 5.2.13.
It seems, that in 5.3.2 this bug was born again
Test script:
---------------
$url = "http://www.sky-bizz.com";
var_dump(filter_var($url, FILTER_VALIDATE_URL));
Expected result:
----------------
string "http://www.sky-bizz.com"
Actual result:
--------------
bool (false)
--
Edit bug report at http://bugs.php.net/bug.php?id=51660&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51660&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51660&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51660&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51660&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=51660&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51660&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=51660&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=51660&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=51660&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=51660&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=51660&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=51660&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=51660&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51660&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51660&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51660&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=51660&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=51660&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=51660&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=51660&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=51660&r=mysqlcfg
