diff --git a/php/tars-client/src/TUPAPIWrapper.php b/php/tars-client/src/TUPAPIWrapper.php index 82a52a11a..46966bdc3 100644 --- a/php/tars-client/src/TUPAPIWrapper.php +++ b/php/tars-client/src/TUPAPIWrapper.php @@ -452,7 +452,7 @@ public static function putMap($paramName, $tag, $map, $iVersion) } } - public function getMap($name, $tag, $obj, $sBuffer, $iVersion) + public static function getMap($name, $tag, $obj, $sBuffer, $iVersion) { try { if ($iVersion === Consts::TARSVERSION) { diff --git a/php/tars-registry/src/QueryFWrapper.php b/php/tars-registry/src/QueryFWrapper.php index 440c97f86..657115ec3 100644 --- a/php/tars-registry/src/QueryFWrapper.php +++ b/php/tars-registry/src/QueryFWrapper.php @@ -52,7 +52,7 @@ public function findObjectById($id) // 这里你能起一个定时器么,i think not, 但是可以起swooletable // 然后在server里面轮询,再去刷swooletable里面缓存的数据 - if (class_exists('swoole_table')) { + if (class_exists('swoole_table') && php_sapi_name() !== "apache" && php_sapi_name() !== "fpm-fcgi") { RouteTable::getInstance(); RouteTable::setRouteInfo($id, $routeInfo); } diff --git a/php/tars-server/src/protocol/TARSProtocol.php b/php/tars-server/src/protocol/TARSProtocol.php index ad5c128af..16da1399a 100644 --- a/php/tars-server/src/protocol/TARSProtocol.php +++ b/php/tars-server/src/protocol/TARSProtocol.php @@ -179,7 +179,6 @@ public function packRsp($paramInfo, $unpackResult, $args, $returnVal) // 完成所有的打包之后,开始编码 $cPacketType = 0; $iMessageType = 0; - $iRequestId = 1; // 使用协程的id $statuses = []; $servantName = $unpackResult['sServantName'];