mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Checking for headers_sent() before setting cookies in Versioned::choose_site_stage() to avoid problems with URL parameters like showqueries=1 and ContentController calling choose_site_stage() (fixes #5557)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105027 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0960bdd76a
commit
a6c968b3f3
@ -618,10 +618,12 @@ class Versioned extends DataObjectDecorator {
|
|||||||
Versioned::reading_stage("Live");
|
Versioned::reading_stage("Live");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Versioned::current_stage() == 'Live') {
|
if(!headers_sent()) {
|
||||||
Cookie::set('bypassStaticCache', null, 0);
|
if(Versioned::current_stage() == 'Live') {
|
||||||
} else {
|
Cookie::set('bypassStaticCache', null, 0);
|
||||||
Cookie::set('bypassStaticCache', '1', 0);
|
} else {
|
||||||
|
Cookie::set('bypassStaticCache', '1', 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user