Fixed Data too long for column 'requestMethod' issue
authorMarcel Werk <burntime@woltlab.com>
Thu, 19 Dec 2013 00:44:01 +0000 (01:44 +0100)
committerMarcel Werk <burntime@woltlab.com>
Thu, 19 Dec 2013 00:44:01 +0000 (01:44 +0100)
wcfsetup/install/files/lib/system/session/SessionHandler.class.php

index af4084047e9ab44ef4752a18e2db796cecebbe4a..0291590032552f1b3e30c739ad0e7a1ef9cfc8da 100644 (file)
@@ -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);