#38189 [Opn->Bgs]: pathinfo can't handle relative path /dir/subdir1/../subdir2/file.ext

From: Date: Sun, 23 Jul 2006 09:50:14 +0000
Subject: #38189 [Opn->Bgs]: pathinfo can't handle relative path /dir/subdir1/../subdir2/file.ext
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-99783@lists.php.net to get a copy of this message
ID: 38189 Updated by: mike@php.net Reported By: jalal at spread-it dot org -Status: Open +Status: Bogus Bug Type: Filesystem function related Operating System: Fedora Core 4 PHP Version: 4.4.2 New Comment: pathinfo() does not do any normalization, ist's just a string function. Previous Comments: ------------------------------------------------------------------------ [2006-07-22 17:40:32] jalal at spread-it dot org Description: ------------ pathinfo() can't handle relative path like /dir/subdir1/../subdir2/file.ext Reproduce code: --------------- $path_parts = pathinfo('/dir/subdir1/../subdir2/file.ext'); print_r($path_parts); Expected result: ---------------- Array ( [dirname] => /dir/subdir2 [basename] => index.html [extension] => html ) Actual result: -------------- Array ( [dirname] => /dir/subdir1/../subdir2 [basename] => index.html [extension] => html ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38189&edit=1

« previous php.bugs (#99783) next »