Skip to content

Commit

Permalink
Invalid response arrays were returning false instead of a PEAR_Error
Browse files Browse the repository at this point in the history
object.

Reported by: Thomas Berger
  • Loading branch information
jparise committed Jun 10, 2008
1 parent 76f0995 commit fd28152
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions SMTP.php
Expand Up @@ -296,8 +296,8 @@ function _parseResponse($valid, $later = false)
/* Compare the server's response code with the valid code/codes. */
if (is_int($valid) && ($this->_code === $valid)) {
return true;
} elseif (is_array($valid)) {
return in_array($this->_code, $valid, true);
} elseif (is_array($valid) && in_array($this->_code, $valid, true)) {
return true;
}

return PEAR::raiseError('Invalid response code received from server',
Expand Down
4 changes: 2 additions & 2 deletions package.xml
Expand Up @@ -22,15 +22,15 @@
<date>2008-04-24</date>
<time>21:47:43</time>
<version>
<release>1.3.0</release>
<release>1.3.1</release>
<api>1.1.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license/3_01.txt">PHP License</license>
<notes>- Add getServiceExtensions (slusarz@curecanti.org, Bug 13763)
<notes>- Invalid response arrays were returning false instead of a PEAR_Error object. (Thomas Berger)
</notes>
<contents>
<dir baseinstalldir="Net" name="/">
Expand Down

0 comments on commit fd28152

Please sign in to comment.