[wp-trac] [WordPress Trac] #3896: Wrong indices in match array in parse_w3cdtf

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 1 22:37:43 GMT 2007


#3896: Wrong indices in match array in parse_w3cdtf
----------------------+-----------------------------------------------------
 Reporter:  mortenf   |       Owner:  anonymous
     Type:  defect    |      Status:  new      
 Priority:  normal    |   Milestone:  2.1.2    
Component:  General   |     Version:  2.1.1    
 Severity:  critical  |    Keywords:  has-patch
----------------------+-----------------------------------------------------
 In rss.php, in the function parse_w3cdtf, the date/time string to parse is
 matched against a regular expression, which captures parts using
 parantheses. The resulting array, $match, is then indexed to obtain each
 part, but the indices used are wrong in two cases.

 Running on some versions of PHP, this leads to a warning when calling the
 function gmmktime:

 {{{
 Warning:  gmmktime() expects parameter 3 to be long, string given in ...
 }}}

 The warning also makes the function return 0, leading to incorrect
 results.

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


More information about the wp-trac mailing list