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

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

 New Comment:

To confirm, this didn't make 5.3.2. It should be in 5.3.3.



Closing duplicate: the original bug is bug #51192.


Previous Comments:
------------------------------------------------------------------------
[2010-04-22 21:48:45] ras...@php.net

This was fixed in svn a while ago.

------------------------------------------------------------------------
[2010-04-22 12:45:00] degeb...@php.net

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.

------------------------------------------------------------------------
[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

Reply via email to