cvs: pear-core /PEAR/Command Channels.php
| From: | Greg Beaver | Date: | Sun, 05 Mar 2006 21:27:05 +0000 |
| Subject: | cvs: pear-core /PEAR/Command Channels.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-4613@lists.php.net to get a copy of this message | ||
cellog Sun Mar 5 21:27:05 2006 UTC
Modified files:
/pear-core/PEAR/Command Channels.php
Log:
remove err suppression @
http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Command/Channels.php?r1=1.44&r2=1.45&diff_format=u
Index: pear-core/PEAR/Command/Channels.php
diff -u pear-core/PEAR/Command/Channels.php:1.44 pear-core/PEAR/Command/Channels.php:1.45
--- pear-core/PEAR/Command/Channels.php:1.44 Thu Mar 2 18:14:13 2006
+++ pear-core/PEAR/Command/Channels.php Sun Mar 5 21:27:05 2006
@@ -18,7 +18,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: Channels.php,v 1.44 2006/03/02 18:14:13 cellog Exp $
+ * @version CVS: $Id: Channels.php,v 1.45 2006/03/05 21:27:05 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -345,13 +345,13 @@
$contents = implode('', file($loc));
}
} else {
- $fp = @fopen($params[0], 'r');
- if (!$fp) {
- if (@file_exists($params[0])) {
+ if (file_exists($params[0])) {
+ $fp = fopen($params[0], 'r');
+ if (!$fp) {
return $this->raiseError('Cannot open "' . $params[0] .
'"');
- } else {
- return $this->raiseError('Unknown channel "' . $channel .
'"');
}
+ } else {
+ return $this->raiseError('Unknown channel "' . $channel .
'"');
}
$contents = '';
while (!feof($fp)) {
@@ -542,8 +542,10 @@
$contents = implode('', file($loc));
}
} else {
- $lastmodified = false;
- $fp = @fopen($params[0], 'r');
+ $lastmodified = $fp = false;
+ if (file_exists($params[0])) {
+ $fp = fopen($params[0], 'r');
+ }
if (!$fp) {
return $this->raiseError('channel-add: cannot open "' .
$params[0] . '"');
}
@@ -660,7 +662,10 @@
$contents = implode('', file($loc));
}
} else {
- $fp = @fopen($params[0], 'r');
+ $fp = false;
+ if (file_exists($params[0])) {
+ $fp = fopen($params[0], 'r');
+ }
if (!$fp) {
return $this->raiseError("Cannot open " . $params[0]);
}