appwrite / sdk-for-php

[READ-ONLY] Official Appwrite PHP SDK 🐘
https://appwrite.io
BSD 3-Clause "New" or "Revised" License
135 stars 21 forks source link

🐛 Bug Report: #13

Closed kiloki-official closed 2 years ago

kiloki-official commented 2 years ago

👟 Reproduction steps

I try to delete a file:

$storage->deleteFile($file_id);

👍 Expected behavior

It should delete a file without an exception.

👎 Actual Behavior

It actually deletes the file. But I get an uncatchable eception (even with Appwrite\AppwriteException):

Uncaught TypeError: Return value of Appwrite\Services\Storage::deleteFile() must be of the type array, string returned in /var/www/djemgo/public_html/vendor/appwrite/appwrite/src/Appwrite/Services/Storage.php:194

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Linux

🧱 Your Environment

0.12.1

👀 Have you spent some time to check if this issue has been raised before?

🏢 Have you read the Code of Conduct?

lohanidamodar commented 2 years ago

@kiloki-official thank you for raising the issue, we will get back to you soon.

brianmutiso commented 2 years ago

I still found the same issue

lohanidamodar commented 2 years ago

@brianmutiso please provide the package version and appwrite server version you are using that causes the issue 🙏🏻

brianmutiso commented 2 years ago

AppWrite server v:0.13.4.304 Php sdk: 5.0.0

lohanidamodar commented 2 years ago

SDK 5.0.0 works only with Appwrite 0.14.x, you should use PHP SDK 4.x.x with Appwrite 0.13.x.

lohanidamodar commented 2 years ago

However, I do see that we have the bug, we will work to fix it. Thank you for notifying.

lohanidamodar commented 2 years ago

@kiloki-official should be solved with latest update.