Skip to content

Commit cb8b089

Browse files
committed
Simplify sanitize_mysql_command() call that extends the real mysql command
Just directly call readlink() which returns the full path regardless if it's a symlink or a regular binary. Signed-off-by: Donatas Abraitis <[email protected]>
1 parent b35ba84 commit cb8b089

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/DB_Command.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2168,9 +2168,7 @@ protected function get_current_sql_modes( $assoc_args ) {
21682168
*/
21692169
private static function sanitize_mysql_command( $command, $default_flags ) {
21702170
return sprintf(
2171-
'/usr/bin/env $(test -L $(command -v %s) && /usr/bin/readlink -f $(command -v %s) || command -v %s)%s',
2172-
$command,
2173-
$command,
2171+
'/usr/bin/env $(/usr/bin/readlink -f $(command -v %s))%s',
21742172
$command,
21752173
$default_flags
21762174
);

0 commit comments

Comments
 (0)