![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Pear Pear programming, this is a very complex subject as with using pear with php can be a difficult task for some, so lets talk pear. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| cellog Sat May 19 23:46:06 2007 UTC Modified files: /pear-core/PEAR ChannelFile.php Log: fix Bug #11009 Zend code analyzer / issues with ChannelFile [doconnor/cellog] http://cvs.php.net/viewvc.cgi/pear-c...&diff_format=u Index: pear-core/PEAR/ChannelFile.php diff -u pear-core/PEAR/ChannelFile.php:1.78 pear-core/PEAR/ChannelFile.php:1.79 --- pear-core/PEAR/ChannelFile.php:1.78 Tue Oct 31 02:54:40 2006 +++ pear-core/PEAR/ChannelFile.php Sat May 19 23:46:06 2007 @@ -15,7 +15,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ChannelFile.php,v 1.78 2006/10/31 02:54:40 cellog Exp $ + * @version CVS: $Id: ChannelFile.php,v 1.79 2007/05/19 23:46:06 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -284,7 +284,7 @@ if ($result !== true) { if ($result->getCode() == 1) { $this->_stack->push(PEAR_CHANNELFILE_ERROR_NO_XML_EXT, 'error', - array('error' => $error)); + array('error' => $result->getMessage())); } else { $this->_stack->push(PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER, 'error'); } @@ -711,7 +711,6 @@ if (!isset($info['servers']['mirror'][0])) { $info['servers']['mirror'] = array($info['servers']['mirror']); } - $i = 0; foreach ($info['servers']['mirror'] as $mirror) { if (!isset($mirror['attribs']['host'])) { $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_HOST, @@ -1014,10 +1013,8 @@ } else { return false; } - $server = $mirror; } else { $rest = $this->_channelInfo['servers']['primary']['rest']; - $server = $this->getServer(); } if (!isset($rest['baseurl'][0])) { $rest['baseurl'] = array($rest['baseurl']); @@ -1155,7 +1152,6 @@ array('mirror' => $mirror)); return false; } - $setmirror = false; if (isset($this->_channelInfo['servers']['mirror'][0])) { foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { if ($mirror == $mir['attribs']['host']) { @@ -1188,7 +1184,6 @@ array('mirror' => $mirror)); return false; } - $setmirror = false; if (isset($this->_channelInfo['servers']['mirror'][0])) { foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { if ($mirror == $mir['attribs']['host']) { @@ -1243,7 +1238,6 @@ array('mirror' => $mirror)); return false; } - $setmirror = false; if (isset($this->_channelInfo['servers']['mirror'][0])) { foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { if ($mirror == $mir['attribs']['host']) { @@ -1355,6 +1349,7 @@ if (isset($this->_channelInfo['name'])) { return $this->_channelInfo['name']; } + return ''; } /** @@ -1413,7 +1408,6 @@ */ function addMirrorFunction($mirror, $type, $version, $name = '') { - $found = false; if (!isset($this->_channelInfo['servers']['mirror'])) { $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_ FOUND, array('mirror' => $mirror)); @@ -1458,7 +1452,6 @@ function setBaseURL($resourceType, $url, $mirror = false) { if ($mirror) { - $found = false; if (!isset($this->_channelInfo['servers']['mirror'])) { $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_ FOUND, array('mirror' => $mirror)); | |||
| Featured Websites | ||||
|
![]() |
| Tags: channelfilephp, cvs, pear, pearcore |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cvs: pear-core /PEAR/Downloader Package.php | Greg Beaver | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear-core /PEAR2 Downloader.php | Greg Beaver | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear-core / package-PEAR.xml package2.xml /PEAR/PackageFile/Generator v2.php | Greg Beaver | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear-core / package-PEAR.xml package2.xml /PEAR Installer.php /PEAR/PackageFile v1.php /PEAR/PackageFile/v2 Validator.php | Greg Beaver | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear-core / package-PEAR.xml package2.xml /PEAR Downloader.php /PEAR/Downloader Package.php | Greg Beaver | Pear | 0 | 05-20-2007 7:42 PM |
| Featured Websites | ||||
|