A null $errorMessage constructor argument has not been supported since
I43d988602b, since wfMessage (via the Message constructor) throws an
exception if the message key is null. It follows that getErrorMessage()
can never return null.
Bug: T99818
Change-Id: I2cbf4909e7237b0a91d100cc5478fb4cfee1d748
* $titleText will be appended if it's not null. (since MW 1.26)
*/
public function __construct(
- $errorMessage = null, $titleText = null, $errorMessageParameters = []
+ $errorMessage, $titleText = null, $errorMessageParameters = []
) {
$this->errorMessage = $errorMessage;
$this->titleText = $titleText;
/**
* @since 1.26
- * @return string|null
+ * @return string
*/
public function getErrorMessage() {
return $this->errorMessage;