Document that IContextSource::getTitle can return null
That can happen if wgTitle is null. Change-Id: I3d8aab232d408e75afb8be82ca714bf5c4fe2427
This commit is contained in:
parent
80a8a8e85c
commit
e2fbfb2f3b
4 changed files with 4 additions and 4 deletions
|
|
@ -83,7 +83,7 @@ abstract class ContextSource implements IContextSource {
|
|||
* Get the Title object
|
||||
*
|
||||
* @since 1.18
|
||||
* @return Title
|
||||
* @return Title|null
|
||||
*/
|
||||
public function getTitle() {
|
||||
return $this->getContext()->getTitle();
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ class DerivativeContext extends ContextSource {
|
|||
/**
|
||||
* Get the Title object
|
||||
*
|
||||
* @return Title
|
||||
* @return Title|null
|
||||
*/
|
||||
public function getTitle() {
|
||||
if ( !is_null( $this->title ) ) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ interface IContextSource {
|
|||
/**
|
||||
* Get the Title object
|
||||
*
|
||||
* @return Title
|
||||
* @return Title|null
|
||||
*/
|
||||
public function getTitle();
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class RequestContext implements IContextSource {
|
|||
/**
|
||||
* Get the Title object
|
||||
*
|
||||
* @return Title
|
||||
* @return Title|null
|
||||
*/
|
||||
public function getTitle() {
|
||||
if ( $this->title === null ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue