mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
- 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:
parent
d725401987
commit
eb64b777fa
2 changed files with 4 additions and 1 deletions
2
NEWS
2
NEWS
|
@ -160,6 +160,8 @@ PHP NEWS
|
||||||
to different characters with cp1251 and cp866. (Scott)
|
to different characters with cp1251 and cp866. (Scott)
|
||||||
- Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf)
|
- Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf)
|
||||||
- Fixed PECL bug #12431 (OCI8 ping functionality is broken). (Oracle Corp.)
|
- 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 #44805 (rename() function is not portable to Windows). (Pierre)
|
||||||
- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick)
|
- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick)
|
||||||
|
|
|
@ -805,7 +805,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
|
||||||
char buffer[33];
|
char buffer[33];
|
||||||
timelib_time_offset *offset = NULL;
|
timelib_time_offset *offset = NULL;
|
||||||
timelib_sll isoweek, isoyear;
|
timelib_sll isoweek, isoyear;
|
||||||
int rfc_colon = 0;
|
int rfc_colon;
|
||||||
|
|
||||||
if (!format_len) {
|
if (!format_len) {
|
||||||
return estrdup("");
|
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);
|
timelib_isoweek_from_date(t->y, t->m, t->d, &isoweek, &isoyear);
|
||||||
|
|
||||||
for (i = 0; i < format_len; i++) {
|
for (i = 0; i < format_len; i++) {
|
||||||
|
rfc_colon = 0;
|
||||||
switch (format[i]) {
|
switch (format[i]) {
|
||||||
/* day */
|
/* day */
|
||||||
case 'd': length = slprintf(buffer, 32, "%02d", (int) t->d); break;
|
case 'd': length = slprintf(buffer, 32, "%02d", (int) t->d); break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue