Skip to content

Commit ae70425

Browse files
Copilotswissspidy
andcommitted
Use explode() consistently for URL query string stripping in remote file handling
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 551634e commit ae70425

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Media_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ public function import( $args, $assoc_args = array() ) {
426426
++$errors;
427427
continue;
428428
}
429-
$name = (string) strtok( Utils\basename( $file ), '?' );
429+
$name = (string) explode( '?', Utils\basename( $file ), 2 )[0];
430430
}
431431

432432
if ( ! empty( $assoc_args['file_name'] ) ) {

0 commit comments

Comments
 (0)