Skip to content

Commit

Permalink
Revert "Fix array offset notice on PHP 7.4 when installing extensions (
Browse files Browse the repository at this point in the history
…joomla#29416)"

This reverts commit 028f66b.
  • Loading branch information
Reconix committed Aug 31, 2020
1 parent bb95946 commit 4c3bca1
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions administrator/components/com_installer/models/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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']);

Expand All @@ -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;
}
Expand Down

0 comments on commit 4c3bca1

Please sign in to comment.