Page MenuHomePhabricator

D495.id1589.diff
No OneTemporary

D495.id1589.diff

diff --git a/io/session/Session.php b/io/session/Session.php
--- a/io/session/Session.php
+++ b/io/session/Session.php
@@ -120,9 +120,15 @@
$lifetime = 2592000;
setcookie(session_name(), self::sessionId(), time() + $lifetime, '/');
}
-
- public function destroy() {
+
+ /**
+ * Destroys the session. This code will automatically unset the session cookie,
+ * and delete the file (or whichever mechanism is used).
+ */
+ public function destroy() : bool
+ {
$this->start();
+ setcookie(session_name(), self::sessionId(), time() - 1, '/');
return session_destroy();
}

File Metadata

Mime Type
text/plain
Expires
Apr 12 2021, 1:40 PM (9 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5679
Default Alt Text
D495.id1589.diff (591 B)

Event Timeline