From e19e56e14cb4941491d8cfe81b9425ae9eddc52e Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 1 Nov 2020 10:21:51 +0100 Subject: [PATCH] FIX to avoid error with geoip --- htdocs/core/class/dolgeoip.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php index 2619d09602b..215a1710b82 100644 --- a/htdocs/core/class/dolgeoip.class.php +++ b/htdocs/core/class/dolgeoip.class.php @@ -92,10 +92,13 @@ class DolGeoIP } elseif (function_exists('geoip_open')) { $this->gi = geoip_open($datfile, GEOIP_STANDARD); - } else { + } + elseif (function_exists('geoip_country_code_by_name')) { $this->gi = 'NOGI'; // We are using embedded php geoip functions //print 'function_exists(geoip_country_code_by_name))='.function_exists('geoip_country_code_by_name'); //print geoip_database_info(); + } else { + $this->gi = ''; // For avoid error } }