[wp-trac] Re: [WordPress Trac] #3944: Entering an invalid post timestamp will be tolerated and results in bad view links

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 12 13:10:48 GMT 2007


#3944: Entering an invalid post timestamp will be tolerated and results in bad
view links
----------------------------------------+-----------------------------------
 Reporter:  erikwasser                  |        Owner:  anonymous
     Type:  defect                      |       Status:  new      
 Priority:  low                         |    Milestone:  2.3      
Component:  Administration              |      Version:  2.1.2    
 Severity:  normal                      |   Resolution:           
 Keywords:  has-patch admin write post  |  
----------------------------------------+-----------------------------------
Comment (by f00f):

 The patched admin-functions.php looks good.

 But, please also patch that crappy time normalization that happens just
 above the current patch.

 Replace
 {{{
 $hh = ($hh > 23 ) ? $hh -24 : $hh;
 $mn = ($mn > 59 ) ? $mn -60 : $mn;
 $ss = ($ss > 59 ) ? $ss -60 : $ss;
 }}}
 with
 {{{
 $hh %= 24;
 $mn %= 60;
 $ss %= 60;
 }}}
 This it will also work if s.o. enters 120 as the value for seconds.

 Sorry for not supplying a patch for that.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3944#comment:10>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list