move cookie payload check into cookie class.

This commit is contained in:
Taylor Otwell
2012-01-25 09:44:38 -06:00
parent c847bc4d5e
commit 071d8ab069
2 changed files with 12 additions and 11 deletions

View File

@@ -41,14 +41,6 @@ class Cookie implements Driver {
$payload = Crypter::encrypt(serialize($session));
// A cookie payload can't exceed 4096 bytes, so if the encrypted payload
// is greater than that, we'll throw an exception so the developer can
// switch to another session driver for the application.
if (strlen($payload) > 4000)
{
throw new \Exception("Session payload too large for cookie.");
}
\Laravel\Cookie::put(Cookie::payload, $payload, $lifetime, $path, $domain);
}