php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68844 filter_var wrong result for url
Submitted: 2015-01-16 13:26 UTC Modified: 2015-01-25 04:22 UTC
From: pavel at 6min dot de Assigned:
Status: No Feedback Package: URL related
PHP Version: 5.4.36 OS: CentOS
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pavel at 6min dot de
New email:
PHP Version: OS:

 

 [2015-01-16 13:26 UTC] pavel at 6min dot de
Description:
------------
I used the function filter_var to filter for valid urls but that is the problem i end up.

The version of php I used is 5.4.35 ( was not possible to choose it from the list above )

Test script:
---------------
$url='https://www.dropbox.com/s/t16e9t2dyv2snl2/Vind%20gratis%20artikelen%20en%20de%20beste%20koopjes%20op%20nl.pepper.com.pdf';
$valid = filter_var($url,FILTER_VALIDATE_URL) !== false;
var_dump($valid);


Expected result:
----------------
true

Actual result:
--------------
false

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-16 20:53 UTC] danack@php.net
-Status: Open +Status: Feedback
 [2015-01-16 20:53 UTC] danack@php.net
Checking on http://3v4l.org/fjWEE

"Output for 5.2.0 - 5.6.3, hhvm-3.3.0 - 3.4.1
bool(true)"

Please can you check what version of PHP you are actually running. And that you are actually getting that output for this code - i.e. that the response isn't being cached, or maybe opcache is running different code than you're expecting.
 [2015-01-25 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC