diff options
author | Anatol Belski <ab@php.net> | 2014-01-03 22:25:58 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-01-03 22:25:58 +0100 |
commit | 46f60fae22b420320f3616e00928d70706cf4f4c (patch) | |
tree | 8202e00dc28dee6500a621cc2bdc1d3e16e85285 /ext/standard/string.c | |
parent | c0d060f5c02db168f1de895b41afffbc6e3cacfb (diff) | |
download | php-git-46f60fae22b420320f3616e00928d70706cf4f4c.tar.gz |
Fixed bug #66395 basename function doesn't remove drive letter
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r-- | ext/standard/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index b3860ade5d..bf2df9a612 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1433,7 +1433,7 @@ PHPAPI void php_basename(const char *s, size_t len, char *suffix, size_t sufflen goto quit_loop; case 1: #if defined(PHP_WIN32) || defined(NETWARE) - if (*c == '/' || *c == '\\') { + if (*c == '/' || *c == '\\' || (*c == ':' && (c - s == 1))) { #else if (*c == '/') { #endif |