From af3cb9fbe38848720d297ef51ae8c36743696e42 Mon Sep 17 00:00:00 2001 From: iWe <16604027+iWECon@users.noreply.github.com> Date: Mon, 8 Jul 2019 13:15:46 +0800 Subject: [PATCH] fix issue#53 fix the problem that the getBrowserName on Safari display iPhone instead of Safari --- lib/Browser.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Browser.php b/lib/Browser.php index 5dc957f..69cbfa5 100644 --- a/lib/Browser.php +++ b/lib/Browser.php @@ -1393,7 +1393,6 @@ protected function checkBrowserAmaya() protected function checkBrowserSafari() { if (stripos($this->_agent, 'Safari') !== false - && stripos($this->_agent, 'iPhone') === false && stripos($this->_agent, 'iPod') === false ) { @@ -1538,7 +1537,10 @@ protected function getChromeVersionOnIos() * @return boolean True if the browser is iPhone otherwise false */ protected function checkBrowseriPhone() - { + { + if (stripos($this->_agent, 'Safari') !== false) { + return $this->checkBrowserSafari(); + } if (stripos($this->_agent, 'iPhone') !== false) { $this->setVersion(self::VERSION_UNKNOWN); $this->setBrowser(self::BROWSER_IPHONE);