]> granicus.if.org Git - php/commitdiff
- Fix buglett with date() that cause truncated strings to be returned when
authorDerick Rethans <derick@php.net>
Wed, 7 Sep 2005 19:09:27 +0000 (19:09 +0000)
committerDerick Rethans <derick@php.net>
Wed, 7 Sep 2005 19:09:27 +0000 (19:09 +0000)
  Unicode is turned on.

ext/date/php_date.c

index ad5ffea94fdc348cf64cfcdc17108df83afc5573..199e38f4586fab66279c3c4d05577d28377a6f9a 100644 (file)
@@ -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);
+       }
 }
 /* }}} */