Skip to content

Commit

Permalink
Continue if setting is unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnFLewis committed May 24, 2020
1 parent a9f325f commit d3fa6bd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/formFactory/ManageWikiFormFactoryBuilder.php
Expand Up @@ -1017,6 +1017,11 @@ private static function submissionSettings(

$permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
foreach ( $wgManageWikiSettings as $name => $set ) {
// No need to do anything if setting does not 'exist'
if ( !isset( $formData[$name] ) ) {
continue;
}

$current = $settingsList[$name];
$mwAllowed = ( $set['restricted'] && $permissionManager->userHasRight( $context->getUser(), 'managewiki-restricted' ) || !$set['restricted'] );
$type = $set['type'];
Expand Down

0 comments on commit d3fa6bd

Please sign in to comment.