From e1bc86d5b47dd1deea0a0b27b27334f59356f27a Mon Sep 17 00:00:00 2001 From: "Noteworthy Software, Inc." Date: Wed, 18 Dec 2024 22:18:43 -0500 Subject: [PATCH] Fix for Opera Browser We had user reported problems with the Opera browser accessing the forum after we upgraded to php 8.2. This change looks like what was actually intended by the code, and it did solve the problem. --- sources/BrowserDetector.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sources/BrowserDetector.class.php b/sources/BrowserDetector.class.php index e0084137a2..70c9c8363e 100644 --- a/sources/BrowserDetector.class.php +++ b/sources/BrowserDetector.class.php @@ -327,12 +327,13 @@ private function _setMajorVersion() } elseif ($this->_browsers['is_opera']) { - if (preg_match('~OPR[/]([0-9][0-9]?[.])~i', $this->_ua, $match) === 1) + if (preg_match('~OPR[/]([0-9][0-9]?[.])~i', $this->_ua, $match) === 1) { $this->_browsers['is_opera' . (int) trim($match[1])] = true; - // Since opera >= 15 wants to look like chrome, set the body to do just that - if (trim($match[1]) >= 15) - $this->_browsers['is_chrome'] = true; + // Since opera >= 15 wants to look like chrome, set the body to do just that + if (trim($match[1]) >= 15) + $this->_browsers['is_chrome'] = true; + } } }