Document that IContextSource::getTitle can return null
authorMarius Hoch <hoo@online.de>
Thu, 24 Apr 2014 17:53:20 +0000 (19:53 +0200)
committerMarius Hoch <hoo@online.de>
Thu, 24 Apr 2014 17:53:20 +0000 (19:53 +0200)
That can happen if wgTitle is null.

Change-Id: I3d8aab232d408e75afb8be82ca714bf5c4fe2427

includes/context/ContextSource.php
includes/context/DerivativeContext.php
includes/context/IContextSource.php
includes/context/RequestContext.php

index 9e55059..4a3c2cb 100644 (file)
@@ -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();
index f5616e0..32a650f 100644 (file)
@@ -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 ) ) {
index f892b02..5534ee3 100644 (file)
@@ -37,7 +37,7 @@ interface IContextSource {
        /**
         * Get the Title object
         *
-        * @return Title
+        * @return Title|null
         */
        public function getTitle();
 
index 6f27a7a..4291e44 100644 (file)
@@ -131,7 +131,7 @@ class RequestContext implements IContextSource {
        /**
         * Get the Title object
         *
-        * @return Title
+        * @return Title|null
         */
        public function getTitle() {
                if ( $this->title === null ) {