You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "sveneld (via GitHub)" <gi...@apache.org> on 2025/03/10 06:34:15 UTC

Re: [PR] THRIFT-1482: Unix domain socket support under PHP [thrift]

sveneld commented on code in PR #3109:
URL: https://github.com/apache/thrift/pull/3109#discussion_r1986682993


##########
lib/php/lib/Transport/TSocket.php:
##########
@@ -218,7 +218,7 @@ public function open()
             throw new TTransportException('Cannot open null host', TTransportException::NOT_OPEN);
         }
 
-        if ($this->port_ <= 0) {
+        if ($this->port_ <= 0 && substr($this->host_, 0, strlen('unix://')) !== 'unix://') {

Review Comment:
   you can make this check like this
   ```
   if ($this->port_ <= 0 && strpos($this->host_, 'unix://') !== 0) {
   ```
   update a unit test lib/php/test/Unit/Lib/Transport/TSocketTest.php



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org