Last modified: 2014-10-21 12:44:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T61724, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59724 - PHP Catchable fatal error: Argument 2 passed to CLDRPluralRuleEvaluator::evaluateCompiled() must be an array, null given, called in Language.php on line 4608 and defined in CLDRPluralRuleEvaluator.php on line 70
PHP Catchable fatal error: Argument 2 passed to CLDRPluralRuleEvaluator::eva...
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.23rc
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-06 16:03 UTC by Sam Reed (reedy)
Modified: 2014-10-21 12:44 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2014-01-06 16:03:30 UTC
[06-Jan-2014 15:55:26] Catchable fatal error: Argument 2 passed to CLDRPluralRuleEvaluator::evaluateCompiled() must be an array, null given, called in /usr/local/apache/common-local/php-1.23wmf8/languages/Language.php on line 4608 and defined at /usr/local/apache/common-local/php-1.23wmf8/languages/utils/CLDRPluralRuleEvaluator.php on line 70
Server: mw1071
Method: GET
URL: http://ar.wikipedia.org/wiki/إدين_هازارد
Backtrace:
#0 /usr/local/apache/common-local/php-1.23wmf8/languages/utils/CLDRPluralRuleEvaluator.php(70): CLDRPluralRuleEvaluator::evaluateCompiled()
#1 /usr/local/apache/common-local/php-1.23wmf8/languages/Language.php(4608): CLDRPluralRuleEvaluator::evaluateCompiled(1.724, NULL)
#2 /usr/local/apache/common-local/php-1.23wmf8/languages/Language.php(3643): Language->getPluralRuleIndexNumber(1.724)
#3 /usr/local/apache/common-local/php-1.23wmf8/includes/parser/CoreParserFunctions.php(361): Language->convertPlural(1.724, Array)
#4 [internal function]: CoreParserFunctions::plural(Object(Parser), '1.724', '?????? ???? ???...', '?????????? ????...', '??????????????', '1.724 ????????', '1.724 ?????????...')
#5 /usr/local/apache/common-local/php-1.23wmf8/includes/parser/Parser.php(3616): call_user_func_array(Array, Array)
#6 /usr/local/apache/common-local/php-1.23wmf8/includes/parser/Parser.php(3333): Parser->callParserFunction(Object(PPFrame_DOM), 'PLURAL', Array)
#7 /usr/local/apache/common-local/php-1.23wmf8/includes/parser/Preprocessor_DOM.php(1113): Parser->braceSubstitution(Array, Object(PPFrame_DOM))
#8 /usr/local/apache/common-local/php-1.23wmf8/includes/parser/Parser.php(3150): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#9 /usr/local/apache/common-local/php-1.23wmf8/includes/parser/Parser.php(620): Parser->replaceVariables('{{PLURAL:1.724|...')
#10 /usr/local/apache/common-local/php-1.23wmf8/includes/parser/Parser.php(4850): Parser->preprocess('{{PLURAL:1.724|...', Object(Title), Object(ParserOptions))
#11 /usr/local/apache/common-local/php-1.23wmf8/includes/cache/MessageCache.php(1002): Parser->transformMsg('{{PLURAL:1.724|...', Object(ParserOptions), NULL)
#12 /usr/local/apache/common-local/php-1.23wmf8/includes/Message.php(855): MessageCache->transform('{{PLURAL:1.724|...', false, Object(Language), NULL)
#13 /usr/local/apache/common-local/php-1.23wmf8/includes/Message.php(592): Message->transformText('{{PLURAL:1.724|...')
#14 /usr/local/apache/common-local/php-1.23wmf8/includes/Message.php(649): Message->toString()
#15 /usr/local/apache/common-local/php-1.23wmf8/includes/parser/Parser.php(554): Message->text()
#16 [internal function]: Parser->parse('{{Infobox footb...', Object(Title), Object(ParserOptions), true, true, 12199180)
#17 /usr/local/apache/common-local/php-1.23wmf8/includes/StubObject.php(99): call_user_func_array(Array, Array)
#18 /usr/local/apache/common-local/php-1.23wmf8/includes/StubObject.php(119): StubObject->_call('parse', Array)
#19 /usr/local/apache/common-local/php-1.23wmf8/includes/content/WikitextContent.php(306): StubObject->__call('parse', Array)
#20 /usr/local/apache/common-local/php-1.23wmf8/includes/content/WikitextContent.php(306): StubObject->parse('{{Infobox footb...', Object(Title), Object(ParserOptions), true, true, 12199180)
#21 /usr/local/apache/common-local/php-1.23wmf8/extensions/FlaggedRevs/backend/FlaggedRevs.class.php(543): WikitextContent->getParserOutput(Object(Title), 12199180, Object(ParserOptions))
#22 /usr/local/apache/common-local/php-1.23wmf8/extensions/FlaggedRevs/frontend/FlaggablePageView.php(701): FlaggedRevs::parseStableRevision(Object(FlaggedRevision), Object(ParserOptions))
#23 /usr/local/apache/common-local/php-1.23wmf8/extensions/FlaggedRevs/frontend/FlaggablePageView.php(354): FlaggablePageView->showStableVersion(Object(FlaggedRevision), '', '')
#24 /usr/local/apache/common-local/php-1.23wmf8/extensions/FlaggedRevs/frontend/FlaggedRevsUI.hooks.php(194): FlaggablePageView->setPageContent(false, true)
#25 [internal function]: FlaggedRevsUIHooks::onArticleViewHeader(Object(Article), false, true)
#26 /usr/local/apache/common-local/php-1.23wmf8/includes/Hooks.php(199): call_user_func_array('FlaggedRevsUIHo...', Array)
#27 /usr/local/apache/common-local/php-1.23wmf8/includes/GlobalFunctions.php(4031): Hooks::run('ArticleViewHead...', Array)
#28 /usr/local/apache/common-local/php-1.23wmf8/includes/Article.php(615): wfRunHooks('ArticleViewHead...', Array)
#29 /usr/local/apache/common-local/php-1.23wmf8/includes/actions/ViewAction.php(44): Article->view()
#30 /usr/local/apache/common-local/php-1.23wmf8/includes/Wiki.php(441): ViewAction->show()
#31 /usr/local/apache/common-local/php-1.23wmf8/includes/Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title))
#32 /usr/local/apache/common-local/php-1.23wmf8/includes/Wiki.php(596): MediaWiki->performRequest()
#33 /usr/local/apache/common-local/php-1.23wmf8/includes/Wiki.php(460): MediaWiki->main()
#34 /usr/local/apache/common-local/php-1.23wmf8/index.php(49): MediaWiki->run()
#35 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#36 {main}
Comment 1 Siebrand Mazeland 2014-01-06 17:17:33 UTC
Smells like something is not being cached. Language::getCompiledPluralRules(), which is called just before evaluateCompiled(), should always return an array, and that's not the case here.
Comment 2 Sam Reed (reedy) 2014-04-03 19:22:39 UTC
It's dropped a couple of lines

PHP Catchable fatal error:  Argument 2 passed to CLDRPluralRuleEvaluator::evaluateCompiled() must be an array, null given, called in /usr/local/apache/common-local/php-1.23wmf19/languages/Language.php on line 4592 and defined in /usr/local/apache/common-local/php-1.23wmf19/languages/utils/CLDRPluralRuleEvaluator.php on line 72
Comment 3 Niklas Laxström 2014-04-03 19:43:35 UTC
The only way I can see this happening is by constructing Language object with code which is not invalid, but not valid according to Language::isValidBuiltInCode. This code does not have plural rules, and fallbacks return empty array in that case, which means $pluralRules is null and that is a fatal error.

Still thinking what would be suitable course of action.
Comment 4 Jamie Thingelstad 2014-04-29 13:07:10 UTC
I’m seeing this error as well in MediaWiki 1.23.0rc0.

PHP Catchable fatal error:  Argument 2 passed to CLDRPluralRuleEvaluator::evaluateCompiled() must be an array, null given, called in /srv/www/mediawiki/public_html/w/languages/Language.php on line 4612 and defined in /srv/www/mediawiki/public_html/w/languages/utils/CLDRPluralRuleEvaluator.php on line 73

Since Niklas mentioned caching, I will also note that I’m occasionally seeing this error from runJobs as well:

PHP Notice:  unserialize(): Error at offset 0 of 27 bytes in /srv/www/mediawiki/public_html/w/includes/cache/LocalisationCache.php on line 1298
PHP Notice:  unserialize(): Error at offset 0 of 11 bytes in /srv/www/mediawiki/public_html/w/includes/cache/LocalisationCache.php on line 1298

They don't happen in the same runJobs instance though.
Comment 5 Niklas Laxström 2014-05-02 12:06:24 UTC
That sounds like your localisation cache is outdated. I expect all errors go away if you run: php maintenance/rebuildLocalizationCache.php --force
Comment 6 Niklas Laxström 2014-10-16 13:34:00 UTC
Jamie, Sam: are you still seeing this or can this be closed?
Comment 7 Niklas Laxström 2014-10-21 12:44:08 UTC
I am not seeing this in the WMF logs anymore.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links