Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array and string offset access syntax with curly braces is deprecated #45

Open
greeven opened this issue Apr 19, 2020 · 3 comments
Open

Comments

@greeven
Copy link

greeven commented Apr 19, 2020

I am using PHP 7.4.4 and get the error Array and string offset access syntax with curly braces is deprecated using the Evernote Client.

Example:

$token = '<token>';
$sandbox = true;

$client = new \Evernote\Client($token, $sandbox);
$notebooks = $client->listNotebooks();

This fails in src/Thrift/Transport/THttpClient.php:100.

Changing

if ((TStringFuncFactory::create()->strlen($uri) > 0) && ($uri{0} != '/')) {

to

if ((TStringFuncFactory::create()->strlen($uri) > 0) && (substr($uri, 0, 1) != '/')) {

resolves the issue.

(I'm not sure if I could just clone the repo, create a branch, fix it and create a merge request. Please let me know if I could fix that myself as I have no experience in that.)

@findstar
Copy link

findstar commented Jul 9, 2020

I have same issue. I'm using php 7.4.6

@artpi
Copy link
Contributor

artpi commented Feb 15, 2021

This is now producing fatals in PHP 8:

PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /Users/artpi/GIT/artpi-tools/vendor/evernote/evernote-cloud-sdk-php/src/Thrift/Transport/THttpClient.php on line 100```

@JimPirrie
Copy link

Same issue:

Array and string offset access syntax with curly braces is no longer supported in xxxxxxxxxxxxxxxx/vendor/evernote/evernote-cloud-sdk-php/src/Thrift/Transport/THttpClient.php on line 100

mikehudson added a commit to mikehudson/evernote-cloud-sdk-php that referenced this issue Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants