Page MenuHomeWickedGov Phorge

ReadOnlyError.php
No OneTemporary

Size
677 B
Referenced Files
None
Subscribers
None

ReadOnlyError.php

<?php
/**
* @license GPL-2.0-or-later
* @file
*/
namespace MediaWiki\Exception;
use MediaWiki\MediaWikiServices;
/**
* Show an error when the wiki is locked/read-only and the user tries to do
* something that requires write access.
*
* @newable
* @since 1.18
* @ingroup Exception
*/
class ReadOnlyError extends ErrorPageError {
/**
* @stable to call
*/
public function __construct() {
$reason = MediaWikiServices::getInstance()->getReadOnlyMode()->getReason();
parent::__construct(
'readonly',
'readonlytext',
$reason ? [ $reason ] : []
);
}
}
/** @deprecated class alias since 1.44 */
class_alias( ReadOnlyError::class, 'ReadOnlyError' );

File Metadata

Mime Type
text/x-php
Expires
Aug 18 2026, 06:34 (7 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e5/b8/911f82341e0d5c2cd5c205c3a477
Default Alt Text
ReadOnlyError.php (677 B)

Event Timeline