Suppress php errors in TSocket
authorMark Slee <mcslee@apache.org>
Wed, 4 Oct 2006 16:49:07 +0000 (16:49 +0000)
committerMark Slee <mcslee@apache.org>
Wed, 4 Oct 2006 16:49:07 +0000 (16:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664814 13f79535-47bb-0310-9956-ffa450edef68

lib/php/src/transport/TSocket.php

index 5ca23e7..c94d075 100644 (file)
@@ -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?