Fatal error: Array and string offset access syntax with curly braces is no longer supported
“Array and string offset access syntax with curly braces” error after a PHP 8 upgrade in WordPress: causes and what to check
PHP 8.0 removed the old $value{0} syntax for reading a character or an array element. Files that still use it no longer compile, so one plugin or theme with this code stops the whole site after a PHP 8 upgrade.
Which of these do you see?
The host switched to PHP 8, and a plugin or theme file uses curly-brace offsets.
The old syntax is in a file that loads only in wp-admin.
Common causes
References
- Backward incompatible changes in PHP 8.0 (PHP.net)
- Debugging in WordPress (Advanced Administration Handbook)
Rather not fix it yourself? Let WP119 handle it automatically.
White screens and fatal errors (plugin conflicts, PHP version incompatibility) are handled automatically: on a copy of your site in the recovery station, the system turns on debug mode, finds the plugin or theme causing the error and deactivates it (not deleted); a white screen caused by exhausted memory is fixed by raising the memory limit. After the fix, the home page and inner pages are re-verified, and only then is the result written back to your host (in WP admin mode, a recovered package is delivered instead). Fixes are made on a copy of your site in the recovery station and written back only after re-verification passes. In your site’s database, the protected tables (members, comments, orders and form submissions) are copied as structure only. In SSH and FTP mode, the system creates a pre-recovery backup on your host before writing back and restores from it if verification after write-back fails. If the recovery cannot be completed, the recovery fee is refunded in full.
- Initial assessment: Site URL entry
- Copy to the recovery station: Work on a copy
- Diagnosis: Item-by-item checks
- Recovery and verification: Home and inner pages
- Write-back or delivery: Only after verification passes
Use WP119 when this error stops the site after a PHP upgrade.
Check my site →