Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: Appwrite\Query::contains(): Argument #2 ($value) must be of type string, array given #29

Open
2 tasks done
barart opened this issue Mar 24, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@barart
Copy link

barart commented Mar 24, 2024

👟 Reproduction steps

Just do a contains query with an array, the same query that is in documentation reproduce this bug:
Query.contains("ingredients", ['apple', 'banana'])

👍 Expected behavior

contains query should accept arrays too

👎 Actual Behavior

contains query only accept string

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Something else

🧱 Your Environment

No response

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

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@barart barart added the bug Something isn't working label Mar 24, 2024
@abnegate abnegate self-assigned this Mar 24, 2024
@junaidmugloo
Copy link

The user is experiencing an issue with passing an array value during a search query. The solution is to check if the array is empty and only pass the query if it is not empty. The issue will be fixed in the next version of Appwrite. The user is advised to print the array value before the query to troubleshoot further. The user also mentions confusion between the terms 'enum' and 'array', and the correct usage is clarified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants