Bug #51660 [NEW]: FILTER_VAR returns FALSE on valid-Urls containing a minus sign
| From: | cimodev at me dot com | Date: | Sun, 25 Apr 2010 09:36:42 +0000 |
| Subject: | Bug #51660 [NEW]: FILTER_VAR returns FALSE on valid-Urls containing a minus sign | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-149862@lists.php.net to get a copy of this message | ||
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