-
Notifications
You must be signed in to change notification settings - Fork 128
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
PHP Warning: Illegal offset type in isset or empty #112
Comments
What is your $id? Is it a string or? Can you show me your model class? What version of the library are you using? |
My $id is an integer, I am using the autoincrement ID from another resource in a SQL database. Here is my class code:
I am using the latest version I think, 4.1.0. |
Thanks :) I will do some troubleshooting in about 10hours... |
Not sure if this is related, or a separate issue ... but I'm receiving a similar "Illegal offset type" error with Elasticquent. The code worked prior to the latest updates ( Elasticquent has the following code:
When the model being queried has a composite key, this throws an exception ... I believe Due to incompatibility with an unknown number of packages that rely on the Eloquent model's "getKeyName" method, I recommend re-introducing the |
That should be a separate issue. Because the model in question doesn't have composite keys. |
hmm, that is debatable because for a composite model, the primary key consists of 2 keys: So in DynamoDB context, getting the key for a composite model should return both partition and sort keys. As for your |
@foxted so I tried to reproduce and could not. Here are my steps:
All is successful... I am wondering if there's something wonky with that particular record that you are trying to find. You mention that getting all items works. What happens if you do Can you show me the result of the above call? and if it also fails, can you show me the result of btw, new version is up, feel free (recommending) to update to version |
I will try version 4.1.1 and see if it fixes the issue. |
I'm closing this one since we haven't been able to reproduce this. Feel free re-open or create a new issue for this. |
Hi there,
First of all, thanks for working on this package, it is awesome.
However, when trying to retrieve an item with a query, I get this error:
My query is the following:
When I try to fetch it using a where query:
I get a different error:
I am actively trying to find the cause of it all, but so far, only querying all the records is working. If anybody has an idea on why this could be happening, it would be much appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: