maj
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* @package Grav\Common\GPM
|
||||
*
|
||||
* @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved.
|
||||
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved.
|
||||
* @license MIT License; see LICENSE file for details.
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace Grav\Common\GPM;
|
||||
use DirectoryIterator;
|
||||
use Grav\Common\Filesystem\Folder;
|
||||
use Grav\Common\Grav;
|
||||
use Grav\Common\Utils;
|
||||
use RuntimeException;
|
||||
use ZipArchive;
|
||||
use function count;
|
||||
@@ -192,7 +193,7 @@ class Installer
|
||||
|
||||
$package_folder_name = $zip->getNameIndex(0);
|
||||
if ($package_folder_name === false) {
|
||||
throw new \RuntimeException('Bad package file: ' . basename($zip_file));
|
||||
throw new \RuntimeException('Bad package file: ' . Utils::basename($zip_file));
|
||||
}
|
||||
$package_folder_name = preg_replace('#\./$#', '', $package_folder_name);
|
||||
$zip->close();
|
||||
|
Reference in New Issue
Block a user