From 60bd175a8349311bc264c2de8852678c67a42545 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 25 Feb 2021 10:04:15 +0100 Subject: [PATCH] Add UserAgent::getUserAgent() --- .../install/files/lib/util/UserAgent.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/wcfsetup/install/files/lib/util/UserAgent.class.php b/wcfsetup/install/files/lib/util/UserAgent.class.php index b54cd6740e..00e424e284 100644 --- a/wcfsetup/install/files/lib/util/UserAgent.class.php +++ b/wcfsetup/install/files/lib/util/UserAgent.class.php @@ -401,6 +401,22 @@ class UserAgent } } + /** + * Returns the raw user agent string. + */ + public function getUserAgent(): string + { + return $this->userAgent; + } + + /** + * @see UserAgent::getUserAgent() + */ + public function __toString(): string + { + return $this->getUserAgent(); + } + /** * Returns the browser based on the user agent or null, if no browser can be determined. */ -- 2.20.1