Open perdedora opened 2 years ago
Update: this does not happen on php7.4
I think this has to do it with recent changes in @ operator. From php 8.0 changelog:
The @ operator no longer silences fatal errors.
This can be solved with:
if (isset($this->files) && $this->files)
$this->files = is_string($this->files) ? json_decode($this->files) : $this->files;
in https://github.com/Circlepuller/Tinyboard/blob/b8f061816edae1c560859d9ea6b90515542a6f17/inc/display.php#L365 and https://github.com/Circlepuller/Tinyboard/blob/b8f061816edae1c560859d9ea6b90515542a6f17/inc/display.php#L315
When trying to access ban-appeals with the config:
I get the following error message:
Caught fatal error: Uncaught TypeError: json_decode(): Argument # 1 ($json) must be of type string, array given in /var/www/Tinyboard/inc/display.php:365Stack trace:# 0 /var/www/Tinyboard/inc/display.php(365): json_decode()# 1 /var/www/Tinyboard/inc/mod/pages.php(1020): Thread->__construct()# 2 /var/www/Tinyboard/mod.php(195): mod_ban_appeals()# 3 {main} thrown in /var/www/Tinyboard/inc/display.php on line 365
Edit: this is with php8.0