Skip to content
This repository

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

Closed
wants to merge 1 commit into from

4 participants

javier gomez Rouven Weßling Ofer Cohen elinw
javier gomez
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 ^_^

javier gomez
Owner

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

javier gomez javigomez closed this August 21, 2012
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

Showing 1 unique commit by 2 authors.

Aug 20, 2012
Rouven Weßling Fix installer/updater in platform for Joomla 3. 8120468
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  libraries/joomla/installer/helper.php
4  libraries/joomla/installer/helper.php
@@ -52,9 +52,9 @@ public static function downloadPackage($url, $target = false)
52 52
 			return false;
53 53
 		}
54 54
 
55  
-		if ($response->headers['wrapper_data']['Content-Disposition'])
  55
+		if (isset($response->headers['Content-Disposition']))
56 56
 		{
57  
-			$contentfilename = explode("\"", $response->headers['wrapper_data']['Content-Disposition']);
  57
+			$contentfilename = explode("\"", $response->headers['Content-Disposition']);
58 58
 			$target = $contentfilename[1];
59 59
 		}
60 60
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.