Skip to content

Commit

Permalink
Supress fsockopen warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Rogov Viktor committed Apr 15, 2015
1 parent ad2c1de commit e31474b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function connect()
{
// Connect (if not already connected)
if (empty($this->_smtp)) {
if ($this->_smtp = fsockopen($this->_server['host'], $this->_server['port'], $errno, $errstr, $this->_server['timeout'])) {
if ($this->_smtp = @fsockopen($this->_server['host'], $this->_server['port'], $errno, $errstr, $this->_server['timeout'])) {
if (substr($response = fgets($this->_smtp), 0, 3) != self::READY) {
$this->close();
throw new ConnectionException('Server NOT ready! The server responded with this message:' . PHP_EOL . $response);
Expand Down

0 comments on commit e31474b

Please sign in to comment.