dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
c417e7d
)
Merge "Apparently for certain (API) requests $this->getTitle() doesn't return a valid...
author
jenkins-bot
<jenkins-bot@gerrit.wikimedia.org>
Thu, 12 Jun 2014 19:28:35 +0000
(19:28 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Thu, 12 Jun 2014 19:28:35 +0000
(19:28 +0000)
includes/OutputPage.php
patch
|
blob
|
history
diff --git
a/includes/OutputPage.php
b/includes/OutputPage.php
index
6075d8d
..
8fd7812
100644
(file)
--- a/
includes/OutputPage.php
+++ b/
includes/OutputPage.php
@@
-1889,7
+1889,12
@@
class OutputPage extends ContextSource {
* /w/index.php?title=Main_page&variant=zh-cn should never be served.
*/
function addAcceptLanguage() {
- $lang = $this->getTitle()->getPageLanguage();
+ $title = $this->getTitle();
+ if ( !$title instanceof Title ) {
+ return;
+ }
+
+ $lang = $title->getPageLanguage();
if ( !$this->getRequest()->getCheck( 'variant' ) && $lang->hasVariants() ) {
$variants = $lang->getVariants();
$aloption = array();