Skip to content

Commit

Permalink
Add Michael's tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Jan 15, 2017
1 parent d2e7a7b commit 1d020d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/cms/installer/helper.php
Expand Up @@ -9,6 +9,8 @@

defined('JPATH_PLATFORM') or die;

use Joomla\Registry\Registry;

jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.path');
Expand Down Expand Up @@ -42,7 +44,7 @@ public static function downloadPackage($url, $target = false)
ini_set('user_agent', $agent);

// Create option with userAgent to supply to transport
$xport_opts = new JRegistry(array('userAgent'=>$agent));
$httpTransportOpts = new Registry(array('userAgent'=>$agent));

// Load installer plugins, and allow url and headers modification
$headers = array();
Expand All @@ -52,7 +54,7 @@ public static function downloadPackage($url, $target = false)

try
{
$response = JHttpFactory::getHttp($xport_opts)->get($url, $headers);
$response = JHttpFactory::getHttp($httpTransportOpts)->get($url, $headers);
}
catch (RuntimeException $exception)
{
Expand Down

0 comments on commit 1d020d6

Please sign in to comment.