diff --git a/src/Composer/Downloader/ArchiveDownloader.php b/src/Composer/Downloader/ArchiveDownloader.php index c8cd77890..3a7f6bb9e 100644 --- a/src/Composer/Downloader/ArchiveDownloader.php +++ b/src/Composer/Downloader/ArchiveDownloader.php @@ -57,7 +57,7 @@ abstract class ArchiveDownloader extends FileDownloader $contentDir = $contentDir[0]; } - if (is_file($contentDir)) { + if (is_string($contentDir) && is_file($contentDir)) { $this->filesystem->rename($contentDir, $path . '/' . basename($contentDir)); } else { foreach (array_merge(glob($contentDir . '/.*'), glob($contentDir . '/*')) as $file) {