mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Added condition to avoid error creating "PastMember" cookie on dev/build (ticket #5780) Thanks simon_w (from r108397)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112724 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
58a50b7351
commit
c4a72efd52
@ -81,7 +81,7 @@ class Controller extends RequestHandler {
|
||||
if(Session::get('loggedInAs') && Security::database_is_ready()) {
|
||||
$member = Member::currentUser();
|
||||
if($member) {
|
||||
Cookie::set("PastMember", true, 90, null, null, false, true);
|
||||
if(!headers_sent()) Cookie::set("PastMember", true, 90, null, null, false, true);
|
||||
DB::query("UPDATE \"Member\" SET \"LastVisited\" = " . DB::getConn()->now() . " WHERE \"ID\" = $member->ID", null);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user