-
-
Couldn't load subscription status.
- Fork 4.6k
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Try to run
occ face:backgroud_job
Expected behaviour
The command should complete successfully
Actual behaviour
Faces found: 0. Image will be skipped because of the following error: Error during image resize for every photo.
Server configuration
Latest Nextcloud docker image
The error occurs because in PHP 8, the imagecreate* functions return objects, when previously they returned resources. The functions in OC_Image.php use is_resource to check for success, and it fails because the returned value is an object.
Because all these image* functions return either a valid object or false (and they previously returned either a valid resource or false), is is sufficient to use !== false to check for success, for PHP 8 and for previous versions as well.
I have tested this change with success on my own installation..