https://bugzilla.wikimedia.org/show_bug.cgi?id=30148
Ori Livneh <o...@wikimedia.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |i18n Status|RESOLVED |REOPENED CC| |maxsem.w...@gmail.com, | |niklas.laxst...@gmail.com, | |o...@wikimedia.org Resolution|INVALID |--- --- Comment #8 from Ori Livneh <o...@wikimedia.org> --- Causing exceptions in production. Example: <https://en.wikipedia.org/wiki/Special:FeedItem/featured/2014021000000/en> 2014-02-01 17:38:26 mw1036 enwiki: [2ec80205] /wiki/Special:FeedItem/featured/2014021000000/en Exception from line 1131 of /usr/local/apache/common-local/php-1.23wmf11/languages/Language.php: Language::sprintfDate: The timestamp 657911014000000 should have 14 characters #0 /usr/local/apache/common-local/php-1.23wmf11/languages/Language.php(2045): Language->sprintfDate('j F Y', '657911014000000') #1 /usr/local/apache/common-local/php-1.23wmf11/extensions/FeaturedFeeds/SpecialFeedItem.php(52): Language->date(2014020979200) #2 /usr/local/apache/common-local/php-1.23wmf11/includes/specialpage/SpecialPage.php(374): SpecialFeedItem->execute('featured/201402...') #3 /usr/local/apache/common-local/php-1.23wmf11/includes/SpecialPageFactory.php(487): SpecialPage->run('featured/201402...') #4 /usr/local/apache/common-local/php-1.23wmf11/includes/Wiki.php(298): SpecialPageFactory::executePath(Object(Title), Object(RequestContext)) #5 /usr/local/apache/common-local/php-1.23wmf11/includes/Wiki.php(599): MediaWiki->performRequest() #6 /usr/local/apache/common-local/php-1.23wmf11/includes/Wiki.php(460): MediaWiki->main() #7 /usr/local/apache/common-local/php-1.23wmf11/index.php(49): MediaWiki->run() #8 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...') #9 {main} Language::date depends on Language::sprintfDate, which does not support TS_MW values longer than 15 characters, but MWTimestamp::getTimestamp( TS_MW ) is liable to generate 15-character values. > $ts = wfTimestamp( TS_MW, 253402300800 ) > $wgContLang->date( $ts ); [b4a5f86b] [no req] Exception from line 1131 of /a/common/php-1.23wmf11/languages/Language.php: Language::sprintfDate: The timestamp should have 14 characters Backtrace: #0 /a/common/php-1.23wmf11/languages/Language.php(2045): Language->sprintfDate(string, boolean) #1 /a/common/php-1.23wmf11/maintenance/eval.php(71) : eval()'d code(1): Language->date(string) #2 /a/common/php-1.23wmf11/maintenance/eval.php(71): eval() #3 /a/common/multiversion/MWScript.php(97): require_once(string) #4 {main} The immediate fix for FeaturedFeeds is to reject feed timestamps set so far in the future as invalid. The longer-term fix is to make the handling of >14 character timestamps consistent across MWTimestamp and Language::sprintfDate, either by making MWTimestamp decline to represent dates beyond 10000-01-01 using TS_MW format, or by making Language::sprintfDate handle TS_MW values longer than 14 characters. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l