-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
getRawSchemalessAttributes() must be of the type array, string returned #45
Comments
Feel free to submit a PR with tests that fixes this. |
Isn't this expected behaviour though? Your database value is most likely set to NULL as a string. Can you confirm for this? 🤔 I've tried to reproduce the issue with a NULL value and it was working properly. The only way I managed was to set NULL as a string. |
I have the same problem at PHP v7.2.14 |
Yes this issue is back because the function is type hinted to an array,
but it calls the return function fromJson which returns a mixed type. |
This problem appears to be an issue still, particularly for those of us using Postgres when you have a null object, ie {}::json. |
move to close: has this been resolved by #60 ? |
X2 |
When a schemaless column from db is set to NULL instead of
{}
, on scout:import it results in that error:Return value of Spatie\SchemalessAttributes\SchemalessAttributes::getRawSchemalessAttributes() must be of the type array, string returned
The text was updated successfully, but these errors were encountered: