Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#7186 closed defect (bug) (fixed)

Win32 / fresh install : date_i18n() outputs error

Reported by: ozh's profile ozh Owned by:
Milestone: 2.6 Priority: normal
Severity: major Version:
Component: Administration Keywords: date_i18n strtotime has-patch
Focuses: Cc:

Description

Apache install on Win32, PHP 4.4.6 and fresh SVN install : the "Write" page spits several error messages:

Warning: date() [function.date]: Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in E:\home\ozh\wordpress\wp-includes\functions.php on line 107

This is caused by date_i18n() when called by wp_post_revision_title():

  • $revision->post_modified_gmt is NULL
  • strtotime( $revision->post_modified_gmt . ' +0000' ) is -1 (5.1.0: strtotime now returns FALSE on failure, instead of -1)

Simple patch attached: make sure date_i18n() isnt given -1 as a timestamp argument.

Sidenote: I can swear I'll submit more tickets when this stupid wiki syntax is improved.

Attachments (1)

ozh_datei18n.patch (557 bytes) - added by ozh 16 years ago.

Download all attachments as: .zip

Change History (3)

@ozh
16 years ago

#1 @ryan
16 years ago

See #6987. Marking that as duplicate since this ticket has a patch.

#2 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [8199]) Fix date() warning on Windows. Props ozh. fixes #7186

Note: See TracTickets for help on using tickets.