Skip to content

Commit

Permalink
Merge pull request #221 from brandonpayton/fix/mysql-command-argument…
Browse files Browse the repository at this point in the history
…-order
  • Loading branch information
schlessera authored Jul 14, 2022
2 parents b3171bd + 4d2c720 commit 1bad974
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/DB_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -1618,11 +1618,12 @@ private static function run( $cmd, $assoc_args = [], $send_to_shell = true, $int
uksort(
$final_args,
static function ( $a, $b ) {
switch ( $b ) {
case 'force':
return -1;
default:
return 1;
if ( 'force' === $a ) {
return 1;
} elseif ( 'force' === $b ) {
return -1;
} else {
return 0;
}
}
);
Expand Down

0 comments on commit 1bad974

Please sign in to comment.