Permalink
Browse files

Consider a 0-byte socket write() result to be a _send() failure.

  • Loading branch information...
1 parent b1fa309 commit 6127d2cb752977ce64fda4652ec1153aa7df0601 @jparise jparise committed Apr 26, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −1 SMTP.php
  2. +1 −0 package.xml
View
2 SMTP.php
@@ -261,7 +261,7 @@ function _send($data)
$this->_debug("Send: $data");
$result = $this->_socket->write($data);
- if ($result === false || PEAR::isError($result)) {
+ if (!$result || PEAR::isError($result)) {
$msg = ($result) ? $result->getMessage() : "unknown error";
return PEAR::raiseError("Failed to write to socket: $msg");
}
View
1 package.xml
@@ -31,6 +31,7 @@
</stability>
<license uri="http://www.php.net/license/3_01.txt">PHP License</license>
<notes>- Adding a new command() method for sending arbitrary SMTP commands.
+- More kinds of socket write() failures are now detected.
</notes>
<contents>
<dir baseinstalldir="Net" name="/">

0 comments on commit 6127d2c

Please sign in to comment.