From:             [EMAIL PROTECTED]
Operating system: GNU/Linux
PHP version:      4.0.4pl1
PHP Bug Type:     Any
Bug description:  pathinfo fails to return when passed a file with no extension

<? 
$info = pathinfo("/foo/bar");
echo ($info["dirname"]."<br>\n");
echo ($info["basename"]."<br>\n");
echo ($info["extension"]."<br>\n");
?>

This should print:
/foo<br>
bar<br>
<br>

but will not return.

<?
$info = pathinfo("/foo/bar.baz");
echo ($info["dirname"]."<br>\n");
echo ($info["basename"]."<br>\n");
echo ($info["extension"]."<br>\n");
?>

prints<?
$info = pathinfo("/foo/bar.");
echo ($info["dirname"]."<br>\n");
echo ($info["basename"]."<br>\n");
echo ($info["extension"]."<br>\n");
?>
/foo<br>
bar.baz<br>
baz<br>

as expected and

<?
$info = pathinfo("/foo/bar.");
echo ($info["dirname"]."<br>\n");
echo ($info["basename"]."<br>\n");
echo ($info["extension"]."<br>\n");
?>

prints
/foo<br>
bar.<br>
<br>

as expected, it's only the case where there is no trailing . that pathinfo
fails to work.

The configure line is:

 './configure' '--with-config-file-path=/www/conf' '--enable-track-vars'
'--with-apxs=/usr/apache/bin/apxs' '--with-oci8' '--enable-ftp'
'--with-mysql' '--with-pgsql' '--enable-xml' '--enable-inline-optimization'
'--disable-debug' '--with-zlib' '--enable-shared' '--with-gnu-ld'
'--with-mcrypt'
-- 
Edit bug report at: http://bugs.php.net/?id=12092&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to