Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/DB_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,10 @@ private static function run( $cmd, $assoc_args = [], $send_to_shell = true, $int
'pass' => DB_PASSWORD,
];

if ( array_key_exists( 'defaults', $assoc_args ) ) {
unset( $assoc_args['defaults'] );
}

if ( ! isset( $assoc_args['default-character-set'] )
&& defined( 'DB_CHARSET' ) && constant( 'DB_CHARSET' ) ) {
$required['default-character-set'] = constant( 'DB_CHARSET' );
Expand Down Expand Up @@ -2095,9 +2099,6 @@ protected function get_defaults_flag_string( &$assoc_args ) {
if ( true === Utils\get_flag_value( $assoc_args, 'defaults' ) ) {
$flag_string = '';
}

unset( $assoc_args['defaults'] );

}
Comment on lines 2099 to 2102
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since get_defaults_flag_string() no longer removes the 'defaults' key from the array, consider updating the method signature from protected function get_defaults_flag_string( &$assoc_args ) to protected function get_defaults_flag_string( $assoc_args ) to remove the unnecessary by-reference parameter.

Copilot uses AI. Check for mistakes.

return $flag_string;
Expand Down
Loading