- MFH: Fixed an issue in date() where a : was printed for the O modifier after

a P modifier was used.
This commit is contained in:
Derick Rethans 2008-05-02 21:33:05 +00:00
parent d725401987
commit eb64b777fa
2 changed files with 4 additions and 1 deletions

2
NEWS
View file

@ -160,6 +160,8 @@ PHP NEWS
to different characters with cp1251 and cp866. (Scott)
- Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf)
- Fixed PECL bug #12431 (OCI8 ping functionality is broken). (Oracle Corp.)
- Fixed an issue in date() where a : was printed for the O modifier after a P
modifier was used. (Derick)
- Fixed bug #44805 (rename() function is not portable to Windows). (Pierre)
- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick)

View file

@ -805,7 +805,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
char buffer[33];
timelib_time_offset *offset = NULL;
timelib_sll isoweek, isoyear;
int rfc_colon = 0;
int rfc_colon;
if (!format_len) {
return estrdup("");
@ -835,6 +835,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
timelib_isoweek_from_date(t->y, t->m, t->d, &isoweek, &isoyear);
for (i = 0; i < format_len; i++) {
rfc_colon = 0;
switch (format[i]) {
/* day */
case 'd': length = slprintf(buffer, 32, "%02d", (int) t->d); break;