summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2009-03-17 05:31:04 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2009-03-17 05:31:04 +0000
commitd8a22d0b05234697825e6f0ea8589429b7c4a6cf (patch)
tree2e8a72c480582d25d6d5bcdcbbb22c2b56b05504 /ext
parent6f3f68311ba22b19e1cf32ec24e86bca6f49bed0 (diff)
downloadphp-git-d8a22d0b05234697825e6f0ea8589429b7c4a6cf.tar.gz
- MFH: Make iconv filter accept '.' as the delimiter between encoding names as
well as '/'. It's impossible to specify the filter in php://filter without this fix. # I hope this to be merged to 5.2 as well. This doesn't break BC as there is # no such encoding name that contains '.'. (Andif there were to be such one, # the filter is failed in the first place since it also uses '.' for the # delimiter between the filter name and the "from" encoding name.
Diffstat (limited to 'ext')
-rw-r--r--ext/iconv/iconv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 6fb0c9a4f6..c3b392c6f4 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -2759,7 +2759,7 @@ static php_stream_filter *php_iconv_stream_filter_factory_create(const char *nam
return NULL;
}
++from_charset;
- if ((to_charset = strchr(from_charset, '/')) == NULL) {
+ if ((to_charset = strpbrk(from_charset, "/.")) == NULL) {
return NULL;
}
from_charset_len = to_charset - from_charset;