Fix bad implode call with nonexistant class variable in PHP SocketPool
authorMark Slee <mcslee@apache.org>
Wed, 15 Nov 2006 22:23:06 +0000 (22:23 +0000)
committerMark Slee <mcslee@apache.org>
Wed, 15 Nov 2006 22:23:06 +0000 (22:23 +0000)
Reviewed By: karl

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664875 13f79535-47bb-0310-9956-ffa450edef68

lib/php/src/transport/TSocketPool.php

index 8c6feeb..9fa967a 100644 (file)
@@ -244,8 +244,12 @@ class TSocketPool extends TSocket {
 
     // Holy shit we failed them all. The system is totally ill!
     $error = 'TSocketPool: All hosts in pool are down. ';
-    $hostlist = implode(',', $this->hosts_);
-    $error .= '('.$hostlist.':'.$this->port_.')';
+    $hosts = array();
+    foreach ($this->servers_ as $server) {
+      $hosts []= $server['host'].':'.$server['port'];
+    }
+    $hostlist = implode(',', $hosts);
+    $error .= '('.$hostlist.')';
     if ($this->debug_) {
       error_log($error);
     }