[wp-trac] [WordPress Trac] #7186: Win32 / fresh install : date_i18n() outputs error

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 26 15:25:14 GMT 2008


#7186: Win32 / fresh install : date_i18n() outputs error
----------------------------+-----------------------------------------------
 Reporter:  ozh             |       Owner:  anonymous                    
     Type:  defect          |      Status:  new                          
 Priority:  normal          |   Milestone:  2.6                          
Component:  Administration  |     Version:                               
 Severity:  major           |    Keywords:  date_i18n strtotime has-patch
----------------------------+-----------------------------------------------
 Apache install on Win32, PHP 4.4.6 and fresh SVN install : the "Write"
 page spits several error messages:[[BR]]
 {{{
 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():[[BR]]
 - $revision->post_modified_gmt is NULL[[BR]]
 - strtotime( $revision->post_modified_gmt . ' +0000' ) is -1 (5.1.0:
 strtotime now returns FALSE on failure, instead of -1)[[BR]]

 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.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7186>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list