From: Ilia Alshanetsky Date: Fri, 1 Nov 2002 00:53:27 +0000 (+0000) Subject: Fixed bug #18710. dirname() now returns consistent output when dealing with X-Git-Tag: php-4.3.0RC1~382 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=500df32e0c02bc791126d2ae62027954a63d4ef5;p=php Fixed bug #18710. dirname() now returns consistent output when dealing with \ directory separators on Windows. --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 3be7d77b7b..449adbb805 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1148,7 +1148,7 @@ PHPAPI void php_dirname(char *path, int len) } if (end < path) { /* The path only contained slashes */ - path[0] = DEFAULT_SLASH; + path[0] = '/'; path[1] = '\0'; return; } @@ -1169,7 +1169,7 @@ PHPAPI void php_dirname(char *path, int len) end--; } if (end < path) { - path[0] = DEFAULT_SLASH; + path[0] = '/'; path[1] = '\0'; return; }