updated grav to 1.7.14

This commit is contained in:
2021-05-12 10:33:19 +02:00
parent 3d5bc71a7c
commit bd4137e00d
553 changed files with 53214 additions and 18091 deletions
+6 -4
View File
@@ -3,12 +3,13 @@
/**
* @package Grav\Common
*
* @copyright Copyright (C) 2015 - 2019 Trilby Media, LLC. All rights reserved.
* @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common;
use InvalidArgumentException;
use function donatj\UserAgent\parse_user_agent;
/**
@@ -16,6 +17,7 @@ use function donatj\UserAgent\parse_user_agent;
*/
class Browser
{
/** @var string[] */
protected $useragent = [];
/**
@@ -25,7 +27,7 @@ class Browser
{
try {
$this->useragent = parse_user_agent();
} catch (\InvalidArgumentException $e) {
} catch (InvalidArgumentException $e) {
$this->useragent = parse_user_agent("Mozilla/5.0 (compatible; Unknown;)");
}
}
@@ -110,7 +112,7 @@ class Browser
/**
* Get the current major version identifier
*
* @return string the browser major version identifier
* @return int the browser major version identifier
*/
public function getVersion()
{
@@ -137,7 +139,7 @@ class Browser
return true;
}
/**
* Determine if “Do Not Track” is set by browser
* @see https://www.w3.org/TR/tracking-dnt/