craft-soft/CS-Bans

Trying to access array offset on value of type bool

Fedingas opened this issue · 7 comments

Shared hosting
PHP 8.1 (i try 8.0 and 7.4 same error)

Error
Trying to access array offset on value of type bool

Demo
https://csbans.apkaba.lt/bans/165.html

Another CS project have same error
https://gilze.lt/csbans/bans/635.html

165.html ban details working when i logged as admin, but guest see error.

Can you please attach the log file (protected/runtime/application.log)

This is known issue.
You can disable view php errors.
For example in index.php after <?php put this code

ini_set('display_errors', 0);
ini_set('error_reporting', E_NONE);
error_reporting(E_NONE);

php errors disabled by default on my hosting.
https://www.part.lt/img/67a557f3eb3d2e2868b65ee881e253e7499.png

I try with [PHP 5.6] and working. So php5 is safe to use?
Or my hosting dont have php extension?

Anyway make it please