diff --git a/libraries/src/Installer/Adapter/PackageAdapter.php b/libraries/src/Installer/Adapter/PackageAdapter.php index 5bd1b0dd97aef..022802d6f181c 100644 --- a/libraries/src/Installer/Adapter/PackageAdapter.php +++ b/libraries/src/Installer/Adapter/PackageAdapter.php @@ -115,15 +115,20 @@ protected function checkExtensionInFilesystem() */ protected function copyBaseFiles() { - $folder = (string) $this->getManifest()->files->attributes()->folder; $source = $this->parent->getPath('source'); - if ($folder) { - $source .= '/' . $folder; + $attributes = $this->getManifest()->files->attributes(); + + if ($attributes) { + $folder = (string) $attributes->folder; + + if ($folder) { + $source .= '/' . $folder; + } } // Install all necessary files - if (!\count($this->getManifest()->files->children())) { + if (!$this->getManifest()->files->count()) { throw new \RuntimeException( Text::sprintf( 'JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES',