PHProxy/phproxy

Broken in PHP 8

CountMurphy opened this issue · 3 comments

Current version of phproxy fails in initial page load.

PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in    /var/www/phproxy/index.php on line 180

Replace following line (line 180) in index.php:
$_flags[$flag_name] = $_frozen_flags[$flag_name] ? $flag_value : (int)(bool)$_iflags{$i};

with:

    if ($_frozen_flags[$flag_name] != 0) {
            $_flags[$flag_name] = $flag_value;
    }

Replace following line (line 180) in index.php: $_flags[$flag_name] = $_frozen_flags[$flag_name] ? $flag_value : (int)(bool)$_iflags{$i};

with:

    if ($_frozen_flags[$flag_name] != 0) {
            $_flags[$flag_name] = $flag_value;
    }

If this is a working solution, then you should submit a pull request.

Well, with this the casting `(int)(bool) has been removed as well.