Fatal error: Curly braces? #38
Description
Activity
A curly brace
{}is for function/method or whole class bodies. It also is for enclosing code inif()orelse()blocks and other control/loop blocks, likewhile(),for(),foreach()et cetera. Replacing them with brackets ([]) will tell PHP to interpret$_iflagsas an array. A white empty page indicates a fatal error which means you should reverse your changes and check log files.$_iflagsis of typestringhere and access on its parts also known as "sub-strings" through curly braces is no longer supported by newer PHP versions. Someone needs to rewrite this code to usesubstr()instead.Plus all these type castings
(int)(bool)looks odd to me.Here is a wonderful article about it:
https://stackoverflow.com/questions/59158548/array-and-string-offset-access-syntax-with-curly-braces-is-deprecatedAnd yes, you can use
$string[$pos]syntax instead. I get an exit code 255 here with[]instead of{}.@Quix0r : the first error after swapping in [] for {} on line 180 is in the deprecated call to get_magic_quotes_gpc() on line 93, which just bails out without any output.
StackOverflow seems to think that can just be replaced with "false".
I'm not really a PHP expert, but I'm going to see if I can get this updated to PHP8 'cause I really want to use it and not have to put up a VM running an older PHP if I can avoid that.
Reacted by Roland HäderOh, and now I look around here someone's already done a PR that does get it running on PHP8:
Reacted by Roland HäderReacted by Roland HäderFixed by #48 — the repo now runs on PHP 8.5.6 with zero deprecations. The container-based dev setup is documented in the README. Closing.
- added a commit that references this issue
on May 27, 2026
Fatal error: Array and string offset access syntax with curly braces is no longer supported in D:\D\htdocs\index.php on line 180
what's a curly braces?
I replaced the $_iflags{$i} with $_iflags[$i] but now the page loads as a blank white page.