Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix installer/updater in platform for Joomla 3. Thanks Rouven #1479

Closed
wants to merge 1 commit into from

4 participants

@javigomez
Owner

When using the Updater in Joomla 3 right now you get a:

  • Notice: Undefined index: wrapper_data in /Users/rouven/Sites/joomla-cms/libraries/joomla/installer/helper.php on line 55

Checking with Rouven he suggested that change attached in the pull request. I have tested with the 3 transports like that:

// using STREAM
$http = new JHttp(null, new JHttpTransportStream(null));

// using sockets
$http = new JHttp(null, new JHttpTransportSocket(null));

// using CURL
$http = JHttpFactory::getHttp();

All they worked for me.

Please review it.
Thanks ^_^

@javigomez
Owner

Sorry, I made a mistake during the test. Actually is not working for Stream and Sockets. Only for CURL

@javigomez javigomez closed this
@elinw

I'm wondering here first why Content-Disposition would be found outside of the wrapper_data. Would it possibly be better to check if $response->headers['wrapper_data']['Content-Disposition']) is !empty? Since it's optional it's valid for it to not be set or to be empty.
http://www.faqs.org/rfcs/rfc2183.html

@realityking, is this change apply to all 3 adapters ? (curl, socket, stream)

Collaborator

Maybe I'm overlooking a key thing here. I understood JHttpResponse::$transport to be an array of all the headers returned by the server. The keys being the header name and the value being the value.

As far as I can tell wrapper_data is something stream specific, if this is the case we should abstract this out in the JHttp transports.

@oc666 I'm not sure what you're asking, this code is outside JHttp, in theory it shouldn't concern itself with the question what transport is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 21, 2012
  1. @realityking @javigomez

    Fix installer/updater in platform for Joomla 3.

    realityking authored javigomez committed
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 libraries/joomla/installer/helper.php
View
4 libraries/joomla/installer/helper.php
@@ -52,9 +52,9 @@ public static function downloadPackage($url, $target = false)
return false;
}
- if ($response->headers['wrapper_data']['Content-Disposition'])
+ if (isset($response->headers['Content-Disposition']))
{
- $contentfilename = explode("\"", $response->headers['wrapper_data']['Content-Disposition']);
+ $contentfilename = explode("\"", $response->headers['Content-Disposition']);
$target = $contentfilename[1];
}
Something went wrong with that request. Please try again.