thiemowmde added subscribers: Umherirrender, thiemowmde.
thiemowmde added a comment.


  The problematic `...` was added in patch 
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseMediaInfo/+/538388
 (T224772 <https://phabricator.wikimedia.org/T224772>) by @Umherirrender 10 
months ago. I think I understand why: I believe Phan gets confused by how the 
called `\OOUI\Tag::appendContent()` method is documented. The method accepts 
any number of `string`, `\OOUI\Tag`, or `\OOUI\HtmlSnippet` in whatever 
combination and order, either as an array or as a list of parameters. So the 
documentation would need to say something like 
`string|Tag|HtmlSnippet|(string|Tag|HtmlSnippet)[]`, but talks about a generic 
`array` instead.
  
  Note that while adding the `...` slightly changed the semantics (while an 
array can be empty, a list of parameters can not), this was not a mistake! 
According to the documentation of getLanguagesOrderedByFallbackChain() it can 
never return an empty array, so getCaptionsContent() can never be an empty 
array as well. I believe there is another bug that makes these methods return 
empty arrays. I created T259779: LanguageFallbackChainFactory returns empty 
fallback chain when it shouldn't <https://phabricator.wikimedia.org/T259779> to 
keep track of this.

TASK DETAIL
  https://phabricator.wikimedia.org/T259745

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Ammarpad, thiemowmde
Cc: thiemowmde, Umherirrender, Agusbou2015, Catrope, Aklapper, brennen, CBogen, 
Akuckartz, darthmon_wmde, Nandana, Lahi, Gq86, Ramsey-WMF, Pablo-WMDE, 
GoranSMilovanovic, QZanden, LawExplorer, Poyekhali, _jensen, rosalieper, 
Taiwania_Justo, Scott_WUaS, Jonas, Ixocactus, Wong128hk, Wikidata-bugs, aude, 
El_Grafo, Dinoguy1000, Ricordisamoa, Lydia_Pintscher, Jdforrester-WMF, 
Steinsplitter, Mbch331, Rxy, Jay8g, Krenair, Keegan
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to