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

if location is null, getting error #6

Open
Saifallak opened this issue Mar 7, 2022 · 2 comments
Open

if location is null, getting error #6

Saifallak opened this issue Mar 7, 2022 · 2 comments

Comments

@Saifallak
Copy link

always getting this error if location col. is null

because of $casts in the model

explode(): Argument #2 ($string) must be of type string, null given
exception: "TypeError",
"/var/www/sonbla/releases/8/vendor/tarfin-labs/laravel-spatial/src/Casts/LocationCast.php"
line: 18,
@tkaratug
Copy link
Collaborator

tkaratug commented Mar 8, 2022

Hi @Saifallak. Thanks for the issue. We've fixed the bug in pr#7.

@tkaratug tkaratug closed this as completed Mar 8, 2022
@reefki
Copy link

reefki commented Mar 28, 2022

Still getting error:

(TypeError(code: 0): explode(): Argument #2 ($string) must be of type string, Illuminate\\Database\\Query\\Expression given at ../vendor/tarfin-labs/laravel-spatial/src/Casts/LocationCast.php:22)

EDIT:

This happened if you are cache the model.

@tkaratug tkaratug reopened this Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants