From 82f3687b1b9cdc99e24e5410158081ae096d70c6 Mon Sep 17 00:00:00 2001 From: acseven Date: Wed, 22 Mar 2017 21:12:51 +0000 Subject: [PATCH] PHP7 Deprecated warnings about class uagent_info --- Subs-MobileDetect.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Subs-MobileDetect.php b/Subs-MobileDetect.php index dc8edc6..37241c8 100644 --- a/Subs-MobileDetect.php +++ b/Subs-MobileDetect.php @@ -376,11 +376,16 @@ class uagent_info /** * The object initializer. Initializes several default variables. */ - function uagent_info() + public function __construct() { $this->useragent = isset($_SERVER['HTTP_USER_AGENT'])?strtolower($_SERVER['HTTP_USER_AGENT']):''; $this->httpaccept = isset($_SERVER['HTTP_ACCEPT'])?strtolower($_SERVER['HTTP_ACCEPT']):''; } + + public function uagent_info() + { + self::__construct(); + } function getDevice() { @@ -1221,4 +1226,4 @@ function DetectTierOtherPhones() } } -?> \ No newline at end of file +?>