diff --git a/src/Composer/Util/Tar.php b/src/Composer/Util/Tar.php index bb8c8c3d2..1fb608f65 100644 --- a/src/Composer/Util/Tar.php +++ b/src/Composer/Util/Tar.php @@ -50,7 +50,7 @@ class Tar } $composerJsonPath = key($topLevelPaths).'/composer.json'; - if ($topLevelPaths && isset($phar[$composerJsonPath])) { + if (\count($topLevelPaths) > 0 && isset($phar[$composerJsonPath])) { return $phar[$composerJsonPath]->getContent(); }