Use UserUtil::getUserAgent() instead.
}
}
if (defined('BLACKLIST_USER_AGENTS') && BLACKLIST_USER_AGENTS != '') {
- if (!StringUtil::executeWordFilter(self::getSession()->userAgent, BLACKLIST_USER_AGENTS)) {
+ if (!StringUtil::executeWordFilter(UserUtil::getUserAgent(), BLACKLIST_USER_AGENTS)) {
if ($isAjax) {
throw new AJAXException(self::getLanguage()->getDynamicVariable('wcf.ajax.error.permissionDenied'), AJAXException::INSUFFICIENT_PERMISSIONS);
}
'userID' => WCF::getUser()->userID,
'ipAddress' => UserUtil::getIpAddress(),
'hostname' => @gethostbyaddr(UserUtil::getIpAddress()),
- 'userAgent' => WCF::getSession()->userAgent,
+ 'userAgent' => UserUtil::getUserAgent(),
'time' => TIME_NOW,
'lastActivityTime' => TIME_NOW
]);