From a456d212494625d4781687da4b7c82af0bf142b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 21 Nov 2015 13:25:09 +0100 Subject: [PATCH] FIX #3231 [Members] Public subscription page displays GeoIP error --- htdocs/core/class/dolgeoip.class.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php index 7cddd4c16f5..a57e4e844ec 100644 --- a/htdocs/core/class/dolgeoip.class.php +++ b/htdocs/core/class/dolgeoip.class.php @@ -58,18 +58,15 @@ class DolGeoIP // Here, function exists (embedded into PHP or exists because we made include) if (empty($type) || empty($datfile)) { - //dol_syslog("DolGeoIP::DolGeoIP parameter datafile not defined", LOG_ERR); - $this->errorlabel='DolGeoIP constructor was called with no datafile parameter'; - //dol_print_error('','DolGeoIP constructor was called with no datafile parameter'); - print $this->errorlabel; + $this->errorlabel='Constructor was called with no datafile parameter'; + dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR); return 0; } if (! file_exists($datfile) || ! is_readable($datfile)) { - //dol_syslog("DolGeoIP::DolGeoIP datafile ".$datfile." can not be read", LOG_ERR); $this->error='ErrorGeoIPClassNotInitialized'; $this->errorlabel="Datafile ".$datfile." not found"; - print $this->errorlabel; // To be sure to understand when it fails on screens + dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR); return 0; }