From: Mark Slee Date: Wed, 15 Nov 2006 22:23:06 +0000 (+0000) Subject: Fix bad implode call with nonexistant class variable in PHP SocketPool X-Git-Tag: 0.2.0~1597 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=588e452bc496c1c9ef3730fce15b1c9796d64c48;p=common%2Fthrift.git Fix bad implode call with nonexistant class variable in PHP SocketPool Reviewed By: karl git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664875 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/php/src/transport/TSocketPool.php b/lib/php/src/transport/TSocketPool.php index 8c6feeb9..9fa967a2 100644 --- a/lib/php/src/transport/TSocketPool.php +++ b/lib/php/src/transport/TSocketPool.php @@ -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); }