diff --git a/administrator/components/com_installer/models/install.php b/administrator/components/com_installer/models/install.php index 78f098886f1c5..b3036ab814786 100644 --- a/administrator/components/com_installer/models/install.php +++ b/administrator/components/com_installer/models/install.php @@ -135,14 +135,6 @@ public function install() return false; } - // Check if package was uploaded successfully. - if (!\is_array($package)) - { - $app->enqueueMessage(JText::_('COM_INSTALLER_UNABLE_TO_FIND_INSTALL_PACKAGE'), 'error'); - - return false; - } - // Get an installer instance. $installer = JInstaller::getInstance(); @@ -153,7 +145,7 @@ public function install() * This must be done before the unpacked check because JInstallerHelper::detectType() returns a boolean false since the manifest * can't be found in the expected location. */ - if (isset($package['dir']) && is_dir($package['dir'])) + if (is_array($package) && isset($package['dir']) && is_dir($package['dir'])) { $installer->setPath('source', $package['dir']); @@ -179,14 +171,14 @@ public function install() } // Was the package unpacked? - if (empty($package['type'])) + if (!$package || !$package['type']) { if (in_array($installType, array('upload', 'url'))) { JInstallerHelper::cleanupInstall($package['packagefile'], $package['extractdir']); } - $app->enqueueMessage(JText::_('JLIB_INSTALLER_ABORT_DETECTMANIFEST'), 'error'); + $app->enqueueMessage(JText::_('COM_INSTALLER_UNABLE_TO_FIND_INSTALL_PACKAGE'), 'error'); return false; }