From: Yasuo Ohgaki Date: Tue, 23 Apr 2002 08:07:19 +0000 (+0000) Subject: Fix possible wide char prolem. X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~477 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6780384ad62d3d9bacd79550823e3a6314c6f7f;p=php Fix possible wide char prolem. Fix empty output when no conversion is performed. # Derick, this needs to be merged. --- diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 4245191be8..6c05cb62a4 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -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; }