From 167068f7a7468dd672d0b5f59901b186d32e7a4f Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 19 Dec 2013 01:44:01 +0100 Subject: [PATCH] Fixed Data too long for column 'requestMethod' issue --- .../install/files/lib/system/session/SessionHandler.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index af4084047e..0291590032 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -172,7 +172,7 @@ class SessionHandler extends SingletonFactory { 'ipAddress' => UserUtil::getIpAddress(), 'userAgent' => UserUtil::getUserAgent(), 'requestURI' => UserUtil::getRequestURI(), - 'requestMethod' => (!empty($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '') + 'requestMethod' => (!empty($_SERVER['REQUEST_METHOD']) ? substr($_SERVER['REQUEST_METHOD'], 0, 7) : '') ); } @@ -370,7 +370,7 @@ class SessionHandler extends SingletonFactory { 'userAgent' => UserUtil::getUserAgent(), 'lastActivityTime' => TIME_NOW, 'requestURI' => UserUtil::getRequestURI(), - 'requestMethod' => (!empty($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '') + 'requestMethod' => (!empty($_SERVER['REQUEST_METHOD']) ? substr($_SERVER['REQUEST_METHOD'], 0, 7) : '') ); if ($spiderID !== null) $sessionData['spiderID'] = $spiderID; $this->session = call_user_func(array($this->sessionEditorClassName, 'create'), $sessionData); -- 2.20.1