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

Add a Patch

Pull Requests

Add a Pull Request

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-2022 The PHP Group
All rights reserved.
Last updated: Wed Oct 05 22:05:53 2022 UTC