icecoder/ICEcoder

Error 500 for createDirIfNotExists

Closed this issue · 3 comments

I have a Rpi3b with raspian 64. When I download an ICEcoder copy (git clone, web, etc), I've changed the permissions, and I've tried to access via web return an error 500: (/var/log/nginx/error.log)

2020/09/14 10:41:15 [error] 24324#24324: *367 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Return value of ICEcoder\System::createDirIfNotExists() must be an instance of ICEcoder\void, none returned in /work/www/ICEcoder/classes/System.php:15
Stack trace:
#0 /work/www/ICEcoder/classes/System.php(34): ICEcoder\System->createDirIfNotExists('/work/www/ICEco...')
#1 /work/www/ICEcoder/lib/settings-common.php(9): ICEcoder\System->setErrorHandling()
#2 /work/www/ICEcoder/lib/headers.php(10): include_once('/work/www/ICEco...')
#3 /work/www/ICEcoder/index.php(4): include('/work/www/ICEco...')
#4 {main}
thrown in /work/www/ICEcoder/classes/System.php on line 15" while reading response header from upstream, client: 192.168.1.155, server: myhost.mydomain.org, request: "GET /ICEcoder/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "myhost.mydomain.org"

I've solved the problem, I'd installed PHP 7.0 when it's necessary 7.1

I've solved the problem, I'd installed PHP 7.0 when it's necessary 7.1

Glad you resolved the issue - sounds like something was introduced in 7.1 that wasn't in 7.0. Will look into it and tweak it so it's truly 7+

Thanks for the info 👍

Found the issue was using the void return type, which isn't introduced in PHP till 7.1.

Removed in 0b75351