Bug #51632 [Opn->Fbk]: filter_var fails to validate correct URL

From: Date: Thu, 22 Apr 2010 10:45:03 +0000
Subject: Bug #51632 [Opn->Fbk]: filter_var fails to validate correct URL
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-149783@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51632&edit=1

 ID:               51632
 Updated by:       degeberg@php.net
 Reported by:      zharkikh at i dot com dot ua
 Summary:          filter_var fails to validate correct URL
-Status:           Open
+Status:           Feedback
 Type:             Bug
 Package:          Unknown/Other Function
 Operating System: FreeBSD
 PHP Version:      5.3.2

 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

PHP 5.3.2 was released on March 4, and the #51305 was fixed on March 3.
It probably didn't make it into the release. It works for me on
5.3.3-dev built a few days ago.


Previous Comments:
------------------------------------------------------------------------
[2010-04-22 11:52:00] zharkikh at i dot com dot ua

Description:
------------
Function filter_var seems to change it behavior when PHP upgraded from
5.2.4 to 5.3.2.
The next example work fine in 5.24 but fail in 5.3.2.
This problem was described in Bug #51305 (filter_var fails if domain
name contain "-") and reported to be fixed in 5.2.13, but it is bubble
again in 5.3.2 :

Test script:
---------------
<?php
$P = 'http://m-zharkikh.livejournal.com/26556.html';
echo filter_var($P, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED);


Expected result:
----------------
http://m-zharkikh.livejournal.com/26556.html,
so URL is valid

Actual result:
--------------
false, so URL provided evaluated as invalid


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51632&edit=1


Thread (4 messages)

« previous php.bugs (#149783) next »