Merge pull request #19812 from shivapoudel/fix/19742

Fix - Notice while downloding GeoIP DB on Windows
This commit is contained in:
Claudio Sanches 2018-04-23 14:17:37 -03:00 committed by GitHub
commit 9d99ca4c47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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() . DIRECTORY_SEPARATOR . $database;
$file_path = trailingslashit( $file->current()->getFileName() ) . $database;
// Extract under uploads directory.
$file->extractTo( $upload_dir['basedir'], $file_path, true );