]> granicus.if.org Git - php/commitdiff
MFH: fixed encoding conversion when http_input=auto.
authorRui Hirokawa <hirokawa@php.net>
Sat, 6 Aug 2011 12:19:33 +0000 (12:19 +0000)
committerRui Hirokawa <hirokawa@php.net>
Sat, 6 Aug 2011 12:19:33 +0000 (12:19 +0000)
ext/mbstring/mb_gpc.c

index 041227d15dbafa8a6d3e5ad2dd0ffa3367a77f49..985a604ebbabdd4860737c93e9f58d7cba7abc51 100644 (file)
@@ -264,8 +264,8 @@ const mbfl_encoding *_php_mb_encoding_handler_ex(const php_mb_encoding_handler_i
        } else {
                /* auto detect */
                from_encoding = NULL;
-               identd = mbfl_encoding_detector_new((enum mbfl_no_encoding *)info->from_encodings, info->num_from_encodings, MBSTRG(strict_detection));
-               if (identd) {
+               identd = mbfl_encoding_detector_new2(info->from_encodings, info->num_from_encodings, MBSTRG(strict_detection));
+               if (identd != NULL) {
                        n = 0;
                        while (n < num) {
                                string.val = (unsigned char *)val_list[n];