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; }