diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-01-19 00:06:08 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2018-01-19 00:06:08 +0300 |
commit | 9f2e8e11a2daed9b4fd9a6b61509ceeb5f1df9b6 (patch) | |
tree | f66ed35a9118ed58ab31a3dd6ed9a5c650d49508 /js | |
parent | 552a8118a4522d0a78dc795591669860adcf5fda (diff) |
Small performance improvement in custom tracker (#12443)
Diffstat (limited to 'js')
-rw-r--r-- | js/tracker.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/js/tracker.php b/js/tracker.php index 551fef0805..674fe19e53 100644 --- a/js/tracker.php +++ b/js/tracker.php @@ -48,9 +48,15 @@ if (!defined("PIWIK_KEEP_JS_TRACKER_COMMENT") $byteStart = 371; // length of comment header in bytes } -$environment = new \Piwik\Application\Environment(null); +class Validator { + public function validate() {} +} +$validator = new Validator(); +$environment = new \Piwik\Application\Environment(null, array( + 'Piwik\Application\Kernel\EnvironmentValidator' => $validator +)); $environment->init(); ProxyHttp::serverStaticFile($file, "application/javascript; charset=UTF-8", $daysExpireFarFuture, $byteStart, $byteEnd); -exit;
\ No newline at end of file +exit; |