THRIFT-5103: Fix for PHP7.4 deprecated syntax
Client: php
Patch: Stoyan Markov
This closes #2230
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 @@
*/
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 @@
*/
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;