Edit report at http://bugs.php.net/bug.php?id=51632&edit=1
ID: 51632 Updated by: ras...@php.net Reported by: zharkikh at i dot com dot ua Summary: filter_var fails to validate correct URL Status: Feedback Type: Bug Package: Unknown/Other Function Operating System: FreeBSD PHP Version: 5.3.2 New Comment: This was fixed in svn a while ago. Previous Comments: ------------------------------------------------------------------------ [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