1
0
Fork 0

Guard against arrays being passed to is_file, fixes #1627

pull/1629/head
Jordi Boggiano 2013-02-27 15:45:04 +01:00
parent 259a25344d
commit 9f961dca92
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ abstract class ArchiveDownloader extends FileDownloader
$contentDir = $contentDir[0]; $contentDir = $contentDir[0];
} }
if (is_file($contentDir)) { if (is_string($contentDir) && is_file($contentDir)) {
$this->filesystem->rename($contentDir, $path . '/' . basename($contentDir)); $this->filesystem->rename($contentDir, $path . '/' . basename($contentDir));
} else { } else {
foreach (array_merge(glob($contentDir . '/.*'), glob($contentDir . '/*')) as $file) { foreach (array_merge(glob($contentDir . '/.*'), glob($contentDir . '/*')) as $file) {