#24898 [Opn->Csd]: Basename is inporperly changing the path var

From: Date: Fri, 01 Aug 2003 12:29:09 +0000
Subject: #24898 [Opn->Csd]: Basename is inporperly changing the path var
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-45169@lists.php.net to get a copy of this message
ID: 24898 Updated by: sniper@php.net Reported By: funyon at funyon dot com -Status: Open +Status: Closed Bug Type: Filesystem function related Operating System: Redhat PHP Version: 4CVS-2003-07-31 (stable) New Comment: This works fine in latest CVS (PHP 4.3.3RC3-dev) and in PHP 4.3.3RC2. Previous Comments: ------------------------------------------------------------------------ [2003-08-01 00:03:11] 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" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24898&edit=1

« previous php.bugs (#45169) next »