mirror of
https://github.com/php/php-src.git
synced 2025-08-20 01:14:28 +02:00
- Fix buglett with date() that cause truncated strings to be returned when
Unicode is turned on.
This commit is contained in:
parent
7eeb91187b
commit
f872d3346c
1 changed files with 6 additions and 2 deletions
|
@ -597,8 +597,12 @@ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int localtime)
|
||||||
|
|
||||||
string = php_format_date(format, format_len, ts, localtime TSRMLS_CC);
|
string = php_format_date(format, format_len, ts, localtime TSRMLS_CC);
|
||||||
|
|
||||||
|
if (UG(unicode)) {
|
||||||
|
RETVAL_UNICODE(string, 0);
|
||||||
|
} else {
|
||||||
RETVAL_STRING(string, 0);
|
RETVAL_STRING(string, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
PHPAPI char *php_format_date(char *format, int format_len, time_t ts, int localtime TSRMLS_DC) /* {{{ */
|
PHPAPI char *php_format_date(char *format, int format_len, time_t ts, int localtime TSRMLS_DC) /* {{{ */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue