Wrong indices in match array in parse_w3cdtf
|Reported by:||mortenf||Owned by:|
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.