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

PHP7.4: Array and string offset access syntax with curly braces is deprecated #16

Open
JamesDPC opened this issue Feb 15, 2021 · 0 comments

Comments

@JamesDPC
Copy link

Hi, getting some deprecation errors when using PHP 7.4:

Deprecated: Array and string offset access syntax with curly braces is deprecated in ......./vendor/symbiote/silverstripe-pdfrendition/src/Model/ComposedPdf.php on line 184

Deprecated: Array and string offset access syntax with curly braces is deprecated in ......./vendor/symbiote/silverstripe-pdfrendition/src/Service/PDFRenditionService.php on line 196

Ref:
https://github.com/nyeholt/silverstripe-pdfrendition/blob/master/src/Model/ComposedPdf.php#L184
https://github.com/nyeholt/silverstripe-pdfrendition/blob/master/src/Service/PDFRenditionService.php#L196

By the looks in both cases it's a quick fix to [ ] e.g $absPath[ strlen($absPath) - 1 ] $href[ 0 ] and also checking that the array index exists prior.

RFC:
https://wiki.php.net/rfc/deprecate_curly_braces_array_access

Cheers
James

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

1 participant