From: Derick Rethans Date: Wed, 7 Sep 2005 19:09:27 +0000 (+0000) Subject: - Fix buglett with date() that cause truncated strings to be returned when X-Git-Tag: RELEASE_0_9_0~267 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f872d3346c981c4fdab60afca0839ed36d96589c;p=php - Fix buglett with date() that cause truncated strings to be returned when Unicode is turned on. --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index ad5ffea94f..199e38f458 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -596,8 +596,12 @@ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int localtime) } string = php_format_date(format, format_len, ts, localtime TSRMLS_CC); - - RETVAL_STRING(string, 0); + + if (UG(unicode)) { + RETVAL_UNICODE(string, 0); + } else { + RETVAL_STRING(string, 0); + } } /* }}} */