#20329 [Opn->Csd]: dirname - empty for root directory

From: Date: Sat, 09 Nov 2002 22:32:31 +0000
Subject: #20329 [Opn->Csd]: dirname - empty for root directory
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-24406@lists.php.net to get a copy of this message
ID: 20329 Updated by: rasmus@php.net Reported By: ernest@vogelsinger.at -Status: Open +Status: Closed Bug Type: Directory function related Operating System: RH Linux 7.2 (Linux 2.4.18-17.7) PHP Version: 4.2.2 New Comment: Works fine in 4.3 Previous Comments: ------------------------------------------------------------------------ [2002-11-09 14:07:34] ernest@vogelsinger.at The documentation to dirname() states: ------------------ Note: In PHP 4.0.3, dirname() was fixed to be POSIX-compliant. Essentially, this means that if there are no slashes in path , a dot ('.') is returned, indicating the current directory. Otherwise, the returned string is path with any trailing /component removed. Note that this means that you will often get a slash or a dot back from dirname() in situations where the older functionality would have given you the empty string. ------------------ This is not true for 4.2.2, for the root directory it (still or again?) returns the empty string. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20329&edit=1

« previous php.bugs (#24406) next »