From 21bdb039b390ee7ec7391d2b33d7d55c027e548c Mon Sep 17 00:00:00 2001 From: jesseheap Date: Sat, 23 Jul 2016 15:30:25 -0400 Subject: [PATCH 1/2] Bug fix with DetectMobileQuick() Function Prior code on line 1089 was using $this->isTierTablet which isn't set when running this the first time. Changed to DetectTierTablet which sets $this->isTierTablet --- PHP/mdetect.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PHP/mdetect.php b/PHP/mdetect.php index 47810a4..b89144a 100755 --- a/PHP/mdetect.php +++ b/PHP/mdetect.php @@ -1086,7 +1086,8 @@ function DetectMobileQuick() return $this->isMobilePhone; //Let's exclude tablets - if ($this->isTierTablet == $this->true) + // Jesse Heap Patch: Prior code was using $this->isTierTablet which isn't set when running this the first time. Changed to DetectTierTablet which sets $this->isTierTablet + if ($this->DetectTierTablet() == $this->true) return $this->false; //Most mobile browsing is done on smartphones @@ -1284,4 +1285,4 @@ function DetectTierOtherPhones() //Was informed by a MobileESP user that it's a best practice // to omit the closing ?> marks here. They can sometimes -// cause errors with HTML headers. \ No newline at end of file +// cause errors with HTML headers. From 12f86623bee42c213d18ccb13f8a9de01e96eab7 Mon Sep 17 00:00:00 2001 From: jesseheap Date: Sat, 23 Jul 2016 15:31:23 -0400 Subject: [PATCH 2/2] Update mdetect.php --- PHP/mdetect.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHP/mdetect.php b/PHP/mdetect.php index b89144a..5a7c35f 100755 --- a/PHP/mdetect.php +++ b/PHP/mdetect.php @@ -4,7 +4,7 @@ // Copyright 2010-2015, Anthony Hand // // -// File version 2015.05.13 (May 13, 2015) +// File version 2016.07.23 (July 23, 2016) // Updates: // - Moved MobileESP to GitHub. https://github.com/ahand/mobileesp // - Opera Mobile/Mini browser has the same UA string on multiple platforms and doesn't differentiate phone vs. tablet.