PHProxy / phproxy

PHP based web proxy. Initially developed by whitefyre
http://phproxy.github.io/
Other
123 stars 72 forks source link

Broken in PHP 8 #25

Open CountMurphy opened 3 years ago

CountMurphy commented 3 years ago

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
WebWire-NL commented 3 years ago

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;
    }
gothickitty93 commented 2 years ago

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.

Quix0r commented 2 months ago

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