HaschekSolutions / pictshare

:camera: PictShare is an open source image, mp4, pastebin hosting service with a simple resizing and upload API that you can host yourself. :rice_scene:
https://www.pictshare.net
Apache License 2.0
819 stars 123 forks source link

S3 backup is broken: Call to undefined function is_defined() #142

Closed Aivean closed 1 year ago

Aivean commented 1 year ago

Looks like #140 introduced a call to undefined function is_defined. Probably a typo, should've used defined instead, like here: https://github.com/FN-Florian/pictshare/blob/25b39bbd864bef27836b60011738ec22db49722b/storage-controllers/s3.controller.php#L31

Logs in docker container when uploading:

==> /var/log/nginx/pictshare/error.log <==
2023/01/12 23:40:47 [error] 24#24: *6 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function is_defined() in /var/www/storage-controllers/s3.controller.php:19
Stack trace:
#0 /var/www/storage-controllers/s3.controller.php(88): S3Storage->connect()
#1 /var/www/inc/core.php(151): S3Storage->pushFile()
#2 /var/www/api/upload.php(84): storageControllerUpload()
#3 {main}
  thrown in /var/www/storage-controllers/s3.controller.php on line 19" while reading response header from upstream, client: 172.18.0.1, server: , request: "POST /api/upload.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost:804", referrer: "http://localhost:804/"
Aivean commented 1 year ago

Thank you for the quick fix!