Tweak - Use of trailingslashit instead

This commit is contained in:
Shiva Poudel 2018-04-23 22:07:14 +05:45
parent a4b5f0bef4
commit 0c5d6dd285
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ class WC_Geolocation {
// Extract files with PharData. Tool built into PHP since 5.3.
$file = new PharData( $tmp_database_path ); // phpcs:ignore PHPCompatibility.PHP.NewClasses.phardataFound
$file_path = $file->current()->getFileName() . '/' . $database;
$file_path = trailingslashit( $file->current()->getFileName() ) . $database;
// Extract under uploads directory.
$file->extractTo( $upload_dir['basedir'], $file_path, true );