Skip to content

Commit

Permalink
Update ManageWikiFormFactoryBuilder.php
Browse files Browse the repository at this point in the history
  • Loading branch information
paladox authored Sep 17, 2023
1 parent 08878c8 commit d1b8eda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/FormFactory/ManageWikiFormFactoryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use ExtensionRegistry;
use HTMLForm;
use IContextSource;
use InvalidArgumentException;
use Linker;
use ManualLogEntry;
use MediaWiki\MediaWikiServices;
Expand All @@ -18,7 +19,6 @@
use Miraheze\ManageWiki\Helpers\ManageWikiSettings;
use Miraheze\ManageWiki\Helpers\ManageWikiTypes;
use Miraheze\ManageWiki\ManageWiki;
use MWException;
use SpecialPage;
use User;
use UserGroupMembership;
Expand Down Expand Up @@ -52,7 +52,7 @@ public static function buildDescriptor(
$formDescriptor = self::buildDescriptorPermissions( $dbName, $ceMW, $special, $config );
break;
default:
throw new MWException( "{$module} not recognised" );
throw new InvalidArgumentException( "{$module} not recognised" );
}

return $formDescriptor;
Expand Down Expand Up @@ -821,7 +821,7 @@ public static function submissionHandler(
$mwReturn = self::submissionPermissions( $formData, $dbName, $special, $config );
break;
default:
throw new MWException( "{$module} not recognised" );
throw new InvalidArgumentException( "{$module} not recognised" );
}

if ( $mwReturn->changes ) {
Expand Down

0 comments on commit d1b8eda

Please sign in to comment.