From: Mark Slee Date: Wed, 4 Oct 2006 16:49:07 +0000 (+0000) Subject: Suppress php errors in TSocket X-Git-Tag: 0.2.0~1658 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=d7cc1c4e63e5d19a567d871d21277aa1fc6fea6a;p=common%2Fthrift.git Suppress php errors in TSocket git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664814 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/php/src/transport/TSocket.php b/lib/php/src/transport/TSocket.php index 5ca23e72..c94d075b 100644 --- a/lib/php/src/transport/TSocket.php +++ b/lib/php/src/transport/TSocket.php @@ -118,17 +118,17 @@ class TSocket extends TTransport { */ public function open() { if ($this->persist_) { - $this->handle_ = pfsockopen($this->host_, + $this->handle_ = @pfsockopen($this->host_, + $this->port_, + $errno, + $errstr, + $this->sendTimeout_/1000.0); + } else { + $this->handle_ = @fsockopen($this->host_, $this->port_, $errno, $errstr, $this->sendTimeout_/1000.0); - } else { - $this->handle_ = fsockopen($this->host_, - $this->port_, - $errno, - $errstr, - $this->sendTimeout_/1000.0); } // Connect failed?