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 8c6feeb..9fa967a 100644
--- a/lib/php/src/transport/TSocketPool.php
+++ b/lib/php/src/transport/TSocketPool.php
@@ -244,8 +244,12 @@
// 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);
}