From: Derick Rethans Date: Fri, 2 May 2008 21:32:13 +0000 (+0000) Subject: - Fixed an issue in date() where a : was printed for the O modifier after a P X-Git-Tag: RELEASE_2_0_0b1~110 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7599f7384b8c80d8b3c34d2053b6c25ecd7ba348;p=php - Fixed an issue in date() where a : was printed for the O modifier after a P modifier was used. --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index a80b21304f..b6a4eb9c2e 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -903,7 +903,7 @@ static char *date_format(char *format, int format_len, int *return_len, timelib_ timelib_time_offset *offset = NULL; timelib_sll isoweek, isoyear; php_locale_data *loc_dat; - int rfc_colon = 0; + int rfc_colon; if (!format_len) { if (UG(unicode)) { @@ -940,6 +940,7 @@ static char *date_format(char *format, int format_len, int *return_len, timelib_ for (i = 0; i < format_len; i++) { no_free = 0; + rfc_colon = 0; switch (format[i]) { /* day */ case 'd': length = date_spprintf(&buffer, 32 TSRMLS_CC, "%02d", (int) t->d); break;