Kill some E_NOTICE when protecting a non-existing page
This commit is contained in:
parent
d20794df5c
commit
36b535d199
2 changed files with 2 additions and 2 deletions
|
|
@ -258,7 +258,7 @@ class ProtectionForm {
|
|||
# to a semi-protected page.
|
||||
global $wgGroupPermissions;
|
||||
|
||||
$edit_restriction = $this->mRestrictions['edit'];
|
||||
$edit_restriction = isset( $this->mRestrictions['edit'] ) ? $this->mRestrictions['edit'] : '';
|
||||
$this->mCascade = $wgRequest->getBool( 'mwProtect-cascade' );
|
||||
if ($this->mCascade && ($edit_restriction != 'protect') &&
|
||||
!(isset($wgGroupPermissions[$edit_restriction]['protect']) && $wgGroupPermissions[$edit_restriction]['protect'] ) )
|
||||
|
|
|
|||
|
|
@ -1447,7 +1447,7 @@ class Title {
|
|||
|
||||
if( $create_perm ) {
|
||||
$params = array("[create=$create_perm] $expiry_description",'');
|
||||
$log->addEntry( $this->mRestrictions['create'] ? 'modify' : 'protect', $this, trim( $reason ), $params );
|
||||
$log->addEntry( ( isset( $this->mRestrictions['create'] ) && $this->mRestrictions['create'] ) ? 'modify' : 'protect', $this, trim( $reason ), $params );
|
||||
} else {
|
||||
$log->addEntry( 'unprotect', $this, $reason );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue