cvs: pear /Net_Socket Socket.php
| From: | Chuck Hagenbuch | Date: | Tue, 06 Jun 2006 04:07:53 +0000 |
| Subject: | cvs: pear /Net_Socket Socket.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-40529@lists.php.net to get a copy of this message | ||
chagenbu Tue Jun 6 04:07:53 2006 UTC
Modified files:
/pear/Net_Socket Socket.php
Log:
Different way of silencing non-fatal errors that doesn't silence fatal errors (closes 7692).
http://cvs.php.net/viewcvs.cgi/pear/Net_Socket/Socket.php?r1=1.25&r2=1.26&diff_format=u
Index: pear/Net_Socket/Socket.php
diff -u pear/Net_Socket/Socket.php:1.25 pear/Net_Socket/Socket.php:1.26
--- pear/Net_Socket/Socket.php:1.25 Tue Nov 15 03:48:06 2005
+++ pear/Net_Socket/Socket.php Tue Jun 6 04:07:53 2006
@@ -17,7 +17,7 @@
// | Chuck Hagenbuch <chuck@horde.org> |
// +----------------------------------------------------------------------+
//
-// $Id: Socket.php,v 1.25 2005/11/15 03:48:06 chagenbu Exp $
+// $Id: Socket.php,v 1.26 2006/06/06 04:07:53 chagenbu Exp $
require_once 'PEAR.php';
@@ -441,14 +441,17 @@
return $this->raiseError('not connected');
}
+ ob_start();
$line = '';
$timeout = time() + $this->timeout;
while (!feof($this->fp) && (!$this->timeout || time() < $timeout)) {
- $line .= @fgets($this->fp, $this->lineLength);
+ $line .= fgets($this->fp, $this->lineLength);
if (substr($line, -1) == "\n") {
+ ob_end_clean();
return rtrim($line, "\r\n");
}
}
+ ob_end_clean();
return $line;
}