Skip to content

Commit

Permalink
Use hasChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Oct 7, 2024
1 parent 1d77a66 commit 34ad8c5
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 @@ -836,10 +836,10 @@ public static function submissionHandler(
throw new InvalidArgumentException( "{$module} not recognised" );
}

if ( $mwReturn->changes ) {
if ( $mwReturn->hasChanges() ) {
$mwReturn->commit();

if ( $module != 'permissions' ) {
if ( $module !== 'permissions' ) {
$mwReturn->logParams['4::wiki'] = $dbName;
}

Expand All @@ -854,7 +854,7 @@ public static function submissionHandler(
return [ [ 'managewiki-changes-none' => null ] ];
}

if ( $mwReturn->errors ?? [] && $module == 'permissions' ) {
if ( $mwReturn->errors ?? [] && $module === 'permissions' ) {
return $mwReturn->errors;
}

Expand Down

0 comments on commit 34ad8c5

Please sign in to comment.