#18710 [NEW]: dirname("/") returns ("\")

From: Date: Fri, 02 Aug 2002 18:18:02 +0000
Subject: #18710 [NEW]: dirname("/") returns ("\")
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15855@lists.php.net to get a copy of this message
From: duncan@emarketeers.com Operating system: Windows 2000 PHP version: 4.2.2 PHP Bug Type: *Directory/Filesystem functions Bug description: dirname("/") returns ("\") dirname() in windows works inconsistently. dirname("/a/b") returns "/a" but dirname("/") returns "\" This makes writing portable code which will work on Unix and Windows problematic. I've looked at ext/standard/string.c and I think the fix would be to replace all occurrences of DEFAULT_SLASH with "/" -- Edit bug report at http://bugs.php.net/?id=18710&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18710&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18710&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18710&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18710&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18710&r=support Expected behavior: http://bugs.php.net/fix.php?id=18710&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18710&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18710&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18710&r=globals

« previous php.bugs (#15855) next »