Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.0

Bug #15750 Unreachable code in PEAR_Downloader
Submitted: 2009-01-23 23:43 UTC
From: doconnor Assigned: dufuz
Status: Closed Package: PEAR (version CVS)
PHP Version: 5.2.6 OS:
Roadmaps: 1.8.0alpha1    

 [2009-01-23 23:43 UTC] doconnor (Daniel O'Connor)
Description: ------------ PEAR_Downloader::_getPackageDownloadURL() has old code which can't be executed. This shows up in the PEAR_Downloader_Package tests. Code: if ($chan->supportsREST($preferred_mirror) && (($base2 = $chan->getBaseURL('REST1.3', $preferred_mirror)) || ($base = $chan->getBaseURL('REST1.0', $preferred_mirror))) ) { // SNIP! return $url; } else { return $this->raiseError($parr['channel'] . ' is using a unsupported protocol - This should never happen.'); } // Oh look, more code here! Test script: --------------- 1. Apply unit test patch 2. Run unit tests Expected result: ---------------- It works Actual result: -------------- It doesn't


 [2009-01-23 23:49 UTC] doconnor (Daniel O'Connor)
 [2009-01-24 10:59 UTC] dufuz (Helgi Þormar Þorbjörnsson)
Killed the dead code, also in downloadDep
 [2009-01-30 18:44 UTC] dufuz (Helgi Þormar Þorbjörnsson)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.