Bug #14832: basename with 2nd parm corrupts source string
| From: | pascal at vmfacility dot fr | Date: | Thu, 03 Jan 2002 20:01:13 +0000 |
| Subject: | Bug #14832: basename with 2nd parm corrupts source string | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-75789@lists.php.net to get a copy of this message | ||
From: pascal@vmfacility.fr
Operating system: Linux 2.4.8-26mdk i686
PHP version: 4.1.0
PHP Bug Type: Directory function related
Bug description: basename with 2nd parm corrupts source string
<?php
$fn="/dir1/dir2/filename.txt";
$basename=basename($fn, ".txt");
echo "basename=$basename\n";
echo "fn after=$fn\n";
?>
X-Powered-By: PHP/4.1.0
Content-type: text/html; charset=iso-8859-15
basename=filename
fn after=/dir1/dir2/filenametxt
$fn ha been corrupted by basename() call.
'./configure' '--disable-static' '--disable-debug'
'--disable-rpath'
'--enable-pic' '--enable-inline-optimization' '--prefix=/usr'
'--with-zlib'
'--with-config-file-path=/etc' '--enable-magic-quotes'
'--enable-debugger'
'--enable-track-vars' '--enable-safe-mode' '--with-exec-dir=/usr/bin'
'--with-regex=system' '--with-versioning' '--enable-sysvsem'
'--enable-sysvshm' '--with-mod_charset' '--enable-force-cgi-redirect'
'--with-mm' '--enable-trans-sid' '--with-dbase'
'--with-filepro'
'--enable-yp' '--enable-ftp' '--with-xml' '--with-gettext'
<br>[Some
modules are external: look for packages php-pgsql,php-mysql,...]
--
Edit bug report at: http://bugs.php.net/?id=14832&edit=1