Skip to content

Calling statically generating an error #36

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

Closed
TheMonk opened this issue Nov 28, 2015 · 2 comments
Closed

Calling statically generating an error #36

TheMonk opened this issue Nov 28, 2015 · 2 comments

Comments

@TheMonk
Copy link

TheMonk commented Nov 28, 2015

Hi,

Not sure if this is the right place. I've been trying to update aon older Laravel project and at the same time upgrade GeoCoder.

Here's the error I'm getting:
"Non-static method Geocoder\Geocoder::geocode() should not be called statically, assuming $this from incompatible context"

And it's being called from

$geocode = Geocoder::geocode($fullAddy);
$coords = $geocode->getCoordinates();

Any idea what could be causing the error? All docs seem to indicate this is the proper way to call Geocoder.

@TheMonk
Copy link
Author

TheMonk commented Nov 29, 2015

Note that I'm attempting to call this from a controller not sure if the syntax should be altered in that case.

@TheMonk
Copy link
Author

TheMonk commented Nov 29, 2015

The issue was the call in the controller. Instead of calling

Use Geocoder\Geocoder

Changed it to

Use Geocoder

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

1 participant