Merged revisions 52120 via svnmerge from

http://svn.silverstripe.com/open/modules/sapphire/branches/govtsecurity

........
  r52120 | sminnee | 2008-04-03 21:40:18 +1300 (Thu, 03 Apr 2008) | 1 line
  
  Fix operation of Cookie::forceExpiry() during testing.
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@53464 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-04-26 06:31:36 +00:00
parent 7759de7433
commit 031ab93e97

View File

@ -34,7 +34,9 @@ class Cookie extends Object {
} }
static function forceExpiry( $name ) { static function forceExpiry( $name ) {
setcookie( $name, null, time() - 86400 ); if(!headers_sent($file, $line)) {
setcookie( $name, null, time() - 86400 );
}
} }
} }