$this->data->features[] = 'wrongVersion'; $this->data->camouflage = true; } } return $this; } private function &detectCamouflagedUCBrowser($ua) { if ($ua == 'Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.2.3.4) Gecko/') { if (!$this->data->isBrowser('UC Browser')) { $this->data->browser->name = 'UC Browser'; $this->data->browser->version = null; $this->data->browser->stock = false; } if ($this->data->isOs('Windows')) { $this->data->os->reset(); } $this->data->engine->reset([ 'name' => 'Gecko' ]); $this->data->device->type = 'mobile'; } if ($this->data->isBrowser('Chrome')) { if (preg_match('/UBrowser\/?([0-9.]*)/u', $ua, $match)) { $this->data->browser->stock = false; $this->data->browser->name = 'UC Browser'; $this->data->browser->version = new Version([ 'value' => $match[1], 'details' => 2 ]); $this->data->browser->type = Constants\BrowserType::BROWSER; unset($this->data->browser->channel); } } return $this; } private function &detectCamouflagedBasedOnEngines() { if (isset($this->data->engine->name) && $this->data->browser->mode != 'proxy') { /* If it claims not to be Trident, but it is probably Trident running camouflage mode */ if ($this->options->engine & Constants\EngineType::TRIDENT) { $this->data->features[] = 'trident'; if ($this->data->engine->name && $this->data->engine->name != 'Trident') { $this->data->camouflage = !isset($this->data->browser->name) || ($this->data->browser->name != 'Maxthon' && $this->data->browser->name != 'Motorola WebKit'); } } /* If it claims not to be Opera, but it is probably Opera running camouflage mode */ if ($this->options->engine & Constants\EngineType::PRESTO) { $this->data->features[] = 'presto'; if ($this->data->engine->name && $this->data->engine->name != 'Presto') { $this->data->camouflage = true; } if (isset($this->data->browser->name) && $this->data->browser->name == 'Internet Explorer') { $this->data->camouflage = true; } } /* If it claims not to be Gecko, but it is probably Gecko running camouflage mode */ if ($this->options->engine & Constants\EngineType::GECKO) { $this->data->features[] = 'gecko'; if ($this->data->engine->name && $this->data->engine->name != 'Gecko') { $this->data->camouflage = true; } if (isset($this->data->browser->name) && $this->data->browser->name == 'Internet Explorer') { $this->data->camouflage = true; } } /* If it claims not to be Webkit, but it is probably Webkit running camouflage mode */ if ($this->options->engine & Constants\EngineType::WEBKIT) { $this->data->features[] = 'webkit'; if ($this->data->engine->name && ($this->data->engine->name != 'Blink' && $this->data->engine->name != 'Webkit')) { $this->data->camouflage = true; } if (isset($this->data->browser->name) && $this->data->browser->name == 'Internet Explorer') { $this->data->camouflage = true; } /* IE 11 on mobile now supports Webkit APIs */ if (isset($this->data->browser->name) && $this->data->browser->name == 'Mobile Internet Explorer' && isset($this->data->browser->version) && $this->data->browser->version->toFloat() >= 11 && isset($this->data->os->name) && $this->data->os->name == 'Windows Phone' ) { $this->data->camouflage = false; } /* IE 11 Developer Preview now supports Webkit APIs */ if (isset($this->data->browser->name) && $this->data->browser->name == 'Internet Explorer' && isset($this->data->browser->version) && $this->data->browser->version->toFloat() >= 11 && isset($this->data->os->name) && $this->data->os->name == 'Windows' ) { $this->data->camouflage = false; } /* EdgeHTML rendering engine also appears to be WebKit */ if (isset($this->data->engine->name) && $this->data->engine->name == 'EdgeHTML') { $this->data->camouflage = false; } /* Firefox 48+ support certain Webkit features */ if ($this->options->engine & Constants\EngineType::GECKO) { $this->data->camouflage = false; } } if ($this->options->engine & Constants\EngineType::CHROMIUM) { $this->data->features[] = 'chrome'; if ($this->data->engine->name && ($this->data->engine->name != 'EdgeHTML' && $this->data->engine->name != 'Blink' && $this->data->engine->name != 'Webkit')) { $this->data->camouflage = true; } } /* If it claims to be Safari and uses V8, it is probably an Android device running camouflage mode */ if ($this->data->engine->name == 'Webkit' && $this->options->engine & Constants\EngineType::V8) { $this->data->features[] = 'v8'; if (isset($this->data->browser->name) && $this->data->browser->name == 'Safari') { $this->data->camouflage = true; } } } return $this; } private function &detectCamouflagedBasedOnFeatures() { if (isset($this->data->browser->name) && isset($this->data->os->name)) { if ($this->data->os->name == 'iOS' && $this->data->browser->name != 'Opera Mini' && $this->data->browser->name != 'UC Browser' && isset($this->data->os->version)) { if ($this->data->os->version->toFloat() < 4.0 && $this->options->features & Constants\Feature::SANDBOX) { $this->data->features[] = 'foundSandbox'; $this->data->camouflage = true; } if ($this->data->os->version->toFloat() < 4.2 && $this->options->features & Constants\Feature::WEBSOCKET) { $this->data->features[] = 'foundSockets'; $this->data->camouflage = true; } if ($this->data->os->version->toFloat() < 5.0 && $this->options->features & Constants\Feature::WORKER) { $this->data->features[] = 'foundWorker'; $this->data->camouflage = true; } } if ($this->data->os->name != 'iOS' && $this->data->browser->name == 'Safari' && isset($this->data->browser->version)) { if ($this->data->browser->version->toFloat() < 4.0 && $this->options->features & Constants\Feature::APPCACHE) { $this->data->features[] = 'foundAppCache'; $this->data->camouflage = true; } if ($this->data->browser->version->toFloat() < 4.1 && $this->options->features & Constants\Feature::HISTORY) { $this->data->features[] = 'foundHistory'; $this->data->camouflage = true; } if ($this->data->browser->version->toFloat() < 5.1 && $this->options->features & Constants\Feature::FULLSCREEN) { $this->data->features[] = 'foundFullscreen'; $this->data->camouflage = true; } if ($this->data->browser->version->toFloat() < 5.2 && $this->options->features & Constants\Feature::FILEREADER) { $this->data->features[] = 'foundFileReader'; $this->data->camouflage = true; } } } return $this; } }
Fatal error: Trait 'WhichBrowser\Analyser\Camouflage' not found in /home/payon/public_html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser.php on line 8