From: Yasuo Ohgaki Date: Tue, 23 Apr 2002 12:50:10 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.2.1RC1~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5e96952d8ea7d41d1c344a0c62934f3ae40e8ac;p=php MFH Fix empty output when no conversion is done. Fix possible problem with wide chars. --- diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 6fd7508ab2..05c5a83c28 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1473,8 +1473,7 @@ PHP_FUNCTION(mb_output_handler) MBSTRG(outconv) = NULL; } if (encoding == mbfl_no_encoding_pass) { - RETVAL_STRING(arg_string, 1); - return; + RETRUN_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 ) { @@ -1497,10 +1496,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; + RETURN_STRINGL(arg_string, arg_string_len, 1); } /* flag */