You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.
Firstly, excellent package and nice work being done here!
The issue:
I am trying to get this to play nice with Laravel Scout and am encountering an issue when using queues with Scout. In the HasBinaryUuid trait, the following function is implemented in your package:
public function newQueryForRestoration($id)
{
return $this->newQueryWithoutScopes()->whereKey(base64_decode($id));
}
When performing operations on models with the Searchable trait, it seems to be passing an array to this function and causing an exception. It seems to be a one element array based on my testing as such:
Greetings,
Firstly, excellent package and nice work being done here!
The issue:
I am trying to get this to play nice with Laravel Scout and am encountering an issue when using queues with Scout. In the HasBinaryUuid trait, the following function is implemented in your package:
When performing operations on models with the Searchable trait, it seems to be passing an array to this function and causing an exception. It seems to be a one element array based on my testing as such:
array(1) { [0]=> string(36) "2d6a1fc0-b4a8-11e8-8375-ac220bbf9530" }
(example)The error: base64_decode() expects parameter 1 to be string, array given
The (very quick) workaround for me:
This is the official source of this function from Laravel:
https://github.com/laravel/framework/blob/5.6/src/Illuminate/Database/Eloquent/Model.php#L972
Does it make sense to make your function override support arrays as well?
Thanks
The text was updated successfully, but these errors were encountered: