]> granicus.if.org Git - php/commitdiff
- Fixed an issue in date() where a : was printed for the O modifier after a P
authorDerick Rethans <derick@php.net>
Fri, 2 May 2008 21:32:13 +0000 (21:32 +0000)
committerDerick Rethans <derick@php.net>
Fri, 2 May 2008 21:32:13 +0000 (21:32 +0000)
  modifier was used.

ext/date/php_date.c

index a80b21304fc3982196352c13e89b5bed20c8e4ec..b6a4eb9c2e95f90a70c9a164d292c2d751d640ec 100644 (file)
@@ -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;