You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecated Functionality: Zend_Http_UserAgent_Mobile implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary)
#49
Open
manan-india opened this issue
Jun 23, 2022
· 3 comments
We have called the function of class(path: vendor/magento/zendframework1/library/Zend/Http/UserAgent/Mobile.php on line 33): This class is implementing the Serializable interface and it is deprecated in PHP 8.1: https://php.watch/versions/8.1/serializable-deprecated.
Implementation:
public function isMobileDevice()
{
$userAgent = $this->httpHeader->getHttpUserAgent();
$server = $this->getRequest()->getServer();
$isMobileDevice = \Zend_Http_UserAgent_Mobile::match($userAgent, $server);
if (!$isMobileDevice) {
return true;
}
return false;
}
When calling the match($userAgent, $server) function for mobile view in the module, it is giving error
PHP: 8.1
Magento: 2.4.4
The text was updated successfully, but these errors were encountered: