Fix call_user_func bug on debugHandler_

Reviewed By: lucas


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664905 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/php/src/transport/TSocketPool.php b/lib/php/src/transport/TSocketPool.php
index 5edac38..8036bea 100644
--- a/lib/php/src/transport/TSocketPool.php
+++ b/lib/php/src/transport/TSocketPool.php
@@ -182,9 +182,10 @@
         if ($elapsed > $retryInterval) {
           $retryIntervalPassed = TRUE;
           if ($this->debug_) {
-            $this->debugHandler_('TSocketPool: retryInterval '.
-                                 '('.$this->retryInterval_.') '.
-                                 'has passed for host '.$host.':'.$port);
+            call_user_func($this->debugHandler_,
+                           'TSocketPool: retryInterval '.
+                           '('.$this->retryInterval_.') '.
+                           'has passed for host '.$host.':'.$port);
           }
         }
       }
@@ -238,9 +239,10 @@
         // Log and cache this failure
         if ($consecfails >= $this->maxConsecutiveFailures_) {
           if ($this->debug_) {
-            $this->debugHandler_('TSocketPool: marking '.$host.':'.$port.
-                                 ' as down for '.$this->retryInterval.' secs '.
-                                 'after '.$consecfails.' failed attempts.');
+            call_user_func($this->debugHandler_,
+                           'TSocketPool: marking '.$host.':'.$port.
+                           ' as down for '.$this->retryInterval.' secs '.
+                           'after '.$consecfails.' failed attempts.');
           }
           // Store the failure time
           apc_store($failtimeKey, time());
@@ -262,7 +264,7 @@
     $hostlist = implode(',', $hosts);
     $error .= '('.$hostlist.')';
     if ($this->debug_) {
-      $this->debugHandler_($error);
+      call_user_func($this->debugHandler_, $error);
     }
     throw new Exception($error);
   }