summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Wallner <mike@php.net>2006-07-17 20:36:47 +0000
committerMichael Wallner <mike@php.net>2006-07-17 20:36:47 +0000
commitc0fcaa7acbc012f850a4a5836f36daeb527337c3 (patch)
tree534fdb7f379958b776c40739e6be014c97eada9c
parent2a06ce851817feb1026a4b22ad388b0a76a30acb (diff)
downloadphp-git-c0fcaa7acbc012f850a4a5836f36daeb527337c3.tar.gz
- fix bug #37945 pathinfo() cannot handle argument with special characters
like german "Umlaute"
-rw-r--r--NEWS2
-rw-r--r--ext/standard/string.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 4f89ff8b96..6b5b34b6a8 100644
--- a/NEWS
+++ b/NEWS
@@ -102,6 +102,8 @@ PHP NEWS
private constructors from invalid context). (Tony)
- Fixed bug #37987 (invalid return of file_exists() in safe mode). (Ilia)
- Fixed bug #37947 (zend_ptr_stack reallocation problem). (Dmitry)
+- Fixed bug #37945 (pathinfo() cannot handle argument with special characters
+ like german "Umlaute"). (Mike)
- Fixed bug #37931 (possible crash in OCI8 after database restart
when using persistent connections). (Tony)
- Fixed bug #37920 (compilation problems on z/OS). (Tony)
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 3323f306af..2eacd3ead0 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -1173,7 +1173,12 @@ PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, char
state = 1;
}
}
+ break;
default:
+ if (state == 0) {
+ comp = c;
+ state = 1;
+ }
break;
}
c += inc_len;