? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
8 May 2016

Summary of Changes

JHttpFactory::getHttp() throws a RuntimeException if there aren't any available transports, so it is better to catch that exception since we are already handling other error conditions in this method versus letting it bubble up. Since the returned JHttp object is only used once, we also don't need to assign it to a variable. The call to JHttpFactory::getHttp() is therefore moved into the try/catch where we attempt to make the remote GET call to download the package so that the error condition is gracefully handled.

Testing Instructions

Make JHttpFactory::getHttp() throw an Exception and try installing an extension via URL. You should get an error with whatever the JLIB_INSTALLER_ERROR_DOWNLOAD_SERVER_CONNECT key translates into as the message instead of it potentially bubbling up to the global exception handler (I don't know if there are any try/catch in the call chain going this way, so something may already be catching exceptions at a higher level; either way this is a semantically correct change).

avatar mbabker mbabker - open - 8 May 2016
avatar mbabker mbabker - change - 8 May 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 May 2016
Labels Added: ?
avatar wilsonge wilsonge - change - 8 May 2016
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-05-08 16:54:46
Closed_By wilsonge
avatar wilsonge wilsonge - close - 8 May 2016
avatar wilsonge wilsonge - merge - 8 May 2016
avatar wilsonge wilsonge - reference | bd34bc7 - 8 May 16
avatar wilsonge wilsonge - merge - 8 May 2016
avatar wilsonge wilsonge - close - 8 May 2016
avatar wilsonge wilsonge - change - 8 May 2016
Milestone Added:
avatar wilsonge
wilsonge - comment - 8 May 2016

Merged on review

avatar mbabker mbabker - head_ref_deleted - 8 May 2016

Add a Comment

Login with GitHub to post a comment