php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24898 Basename is inporperly changing the path var
Submitted: 2003-08-01 00:03 UTC Modified: 2003-08-01 07:29 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: funyon at funyon dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4CVS-2003-07-31 (stable) OS: Redhat
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: funyon at funyon dot com
New email:
PHP Version: OS:

 

 [2003-08-01 00:03 UTC] funyon at funyon dot com
Description:
------------
it seems that the function basename changes it's second var is getting stomped on (it is removing the . out of the path)

Reproduce code:
---------------
$arr = array("Fla"=>"someflash.swf");
$name = basename($arr['Fla'],".swf");
$FlashFile = $arr['Fla'];
$width = $arr['FlashWidth'];
$height = $arr['FlashHeight'];


Expected result:
----------------
$name = "someflash"
$FlashFile = "someflash.swf"

Actual result:
--------------
$name = "someflash"
$FlashFile = "someflash swf"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-01 07:29 UTC] sniper@php.net
This works fine in latest CVS (PHP 4.3.3RC3-dev) and in PHP 4.3.3RC2.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC