Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Goteo/Model/Location/LocationItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ static public function get($id) {
*/
static public function createByIp($id, $ip){
$cities = Config::get('geolocation.maxmind.cities');

if (!$cities)
return false;

try {
// This creates the Reader object, which should be reused across lookups.
$reader = new \GeoIp2\Database\Reader($cities);
Expand Down