Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2019-03-28 10:42:18 +0300
committerGitHub <noreply@github.com>2019-03-28 10:42:18 +0300
commit6963109658b5b411f8adf1a5ccb3ed5eb50fa4dc (patch)
tree1ffb16164a6318350dc40513e70fcd9b5ec48cbf
parentb8e71ea1748362a0e6553cf3273f28e96c515220 (diff)
Fix number of sprintf placeholders in GeoIP2AutoUpdater (#14259)
* remove unused code * Fix number of sprintf placeholders
-rw-r--r--plugins/GeoIp2/GeoIP2AutoUpdater.php31
1 files changed, 1 insertions, 30 deletions
diff --git a/plugins/GeoIp2/GeoIP2AutoUpdater.php b/plugins/GeoIp2/GeoIP2AutoUpdater.php
index 20707aa415..056b5f7988 100644
--- a/plugins/GeoIp2/GeoIP2AutoUpdater.php
+++ b/plugins/GeoIp2/GeoIP2AutoUpdater.php
@@ -52,14 +52,6 @@ class GeoIP2AutoUpdater extends Task
);
/**
- * PHP Error caught through a custom error handler while trying to use a downloaded
- * GeoIP 2 database. See catchGeoIPError for more info.
- *
- * @var array
- */
- private static $unzipPhpError = null;
-
- /**
* Constructor.
*/
public function __construct()
@@ -527,7 +519,7 @@ class GeoIP2AutoUpdater extends Task
} catch (\Exception $e) {
if($logErrors) {
Log::error("GeoIP2AutoUpdater: Encountered exception when performing redundant tests on GeoIP2 "
- . "%s database: %s: %s", $type, $e->getMessage());
+ . "%s database: %s", $type, $e->getMessage());
}
// get the current filename for the DB and an available new one to rename it to
@@ -568,27 +560,6 @@ class GeoIP2AutoUpdater extends Task
}
/**
- * Custom PHP error handler used to catch any PHP errors that occur when
- * testing a downloaded GeoIP 2 file.
- *
- * If we download a file that is supposed to be a GeoIP 2 database, we need to make
- * sure it is one. This is done simply by attempting to use it. If this fails, it
- * will most of the time fail as a PHP error, which we catch w/ this function
- * after it is passed to set_error_handler.
- *
- * The PHP error is stored in self::$unzipPhpError.
- *
- * @param int $errno
- * @param string $errstr
- * @param string $errfile
- * @param int $errline
- */
- public static function catchGeoIPError($errno, $errstr, $errfile, $errline)
- {
- self::$unzipPhpError = array($errno, $errstr, $errfile, $errline);
- }
-
- /**
* Returns the time the auto updater was last run.
*
* @return Date|false