]> granicus.if.org Git - php/commitdiff
Fix possible wide char prolem.
authorYasuo Ohgaki <yohgaki@php.net>
Tue, 23 Apr 2002 08:07:19 +0000 (08:07 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Tue, 23 Apr 2002 08:07:19 +0000 (08:07 +0000)
Fix empty output when no conversion is performed.
# Derick, this needs to be merged.

ext/mbstring/mbstring.c

index 4245191be8f7b317a3db4eb49adbdf19b7db2ea0..6c05cb62a4eb9ab19e651c51ebb56eb3667c4003 100644 (file)
@@ -1539,8 +1539,7 @@ PHP_FUNCTION(mb_output_handler)
                        MBSTRG(outconv) = NULL;
                }
                if (encoding == mbfl_no_encoding_pass) {
-                       RETVAL_STRING(arg_string, 1);
-                       return;
+                       RETURN_STRINGL(arg_string, arg_string_len, 1);
                }
                /* if content-type is not yet set, set it and activate the converter */
                if (SG(sapi_headers).send_default_content_type ) {
@@ -1563,9 +1562,7 @@ PHP_FUNCTION(mb_output_handler)
 
        /* just return if the converter is not activated. */
        if (MBSTRG(outconv) == NULL) {
-               zval_dtor(return_value);
-               Z_STRVAL_P(return_value) = arg_string;
-               zval_copy_ctor(return_value);
+               RETURN_STRINGL(arg_string, arg_string_len, 1);
                return;
        }