You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2020/10/01 21:04:01 UTC

[thrift] branch master updated: THRIFT-5103: Fix for PHP7.4 deprecated syntax Client: php Patch: Stoyan Markov

This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new 44b0b5d  THRIFT-5103: Fix for PHP7.4 deprecated syntax Client: php Patch: Stoyan Markov
44b0b5d is described below

commit 44b0b5d3c9b2bcaae43470bfe98721d0281958e5
Author: Stoyan Markov <st...@modix.eu>
AuthorDate: Fri Sep 4 12:49:38 2020 +0200

    THRIFT-5103: Fix for PHP7.4 deprecated syntax
    Client: php
    Patch: Stoyan Markov
    
    This closes #2230
---
 lib/php/lib/Transport/TCurlClient.php | 2 +-
 lib/php/lib/Transport/THttpClient.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/php/lib/Transport/TCurlClient.php b/lib/php/lib/Transport/TCurlClient.php
index 2060d34..f781da9 100644
--- a/lib/php/lib/Transport/TCurlClient.php
+++ b/lib/php/lib/Transport/TCurlClient.php
@@ -99,7 +99,7 @@ class TCurlClient extends TTransport
      */
     public function __construct($host, $port = 80, $uri = '', $scheme = 'http')
     {
-        if ((TStringFuncFactory::create()->strlen($uri) > 0) && ($uri{0} != '/')) {
+        if ((TStringFuncFactory::create()->strlen($uri) > 0) && ($uri[0] != '/')) {
             $uri = '/' . $uri;
         }
         $this->scheme_ = $scheme;
diff --git a/lib/php/lib/Transport/THttpClient.php b/lib/php/lib/Transport/THttpClient.php
index 0158809..4d6be32 100644
--- a/lib/php/lib/Transport/THttpClient.php
+++ b/lib/php/lib/Transport/THttpClient.php
@@ -106,7 +106,7 @@ class THttpClient extends TTransport
      */
     public function __construct($host, $port = 80, $uri = '', $scheme = 'http', array $context = array())
     {
-        if ((TStringFuncFactory::create()->strlen($uri) > 0) && ($uri{0} != '/')) {
+        if ((TStringFuncFactory::create()->strlen($uri) > 0) && ($uri[0] != '/')) {
             $uri = '/' . $uri;
         }
         $this->scheme_ = $scheme;