php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49488 Problem in "pathinfo"
Submitted: 2009-09-07 07:24 UTC Modified: 2009-09-07 08:40 UTC
Votes:79
Avg. Score:3.1 ± 0.4
Reproduced:77 of 77 (100.0%)
Same Version:77 (100.0%)
Same OS:77 (100.0%)
From: rasviar at gmail dot com Assigned:
Status: Not a bug Package: URL related
PHP Version: 5.3.0 OS: Windows Xp
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rasviar at gmail dot com
New email:
PHP Version: OS:

 

 [2009-09-07 07:24 UTC] rasviar at gmail dot com
Description:
------------
Try to use "pathinfo" function for retrieving filename from URL with only a base URL. For example 'http://www.abc.com/'. It must return a null value, but returning 'www.abc' which is wrong not a file.

Reproduce code:
---------------
<?php
$url="http://www.abc.com/";
echo pathinfo($url,PATHINFO_FILENAME);
?>

Expected result:
----------------
null

Actual result:
--------------
www.abc

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-07 08:40 UTC] jani@php.net
pathinfo() is filesystem function. It's not meant for URLs. RTFM..

 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 17 05:05:45 2022 UTC