From 54b81a3953339d6836f0d930dacb941ac564ebd5 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 30 Aug 2011 08:38:03 +0200 Subject: [PATCH] MINOR Don't set cookies in CLI mode for Versioned (AIR-75) --- model/Versioned.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/Versioned.php b/model/Versioned.php index 620fa2c07..4989c9a76 100644 --- a/model/Versioned.php +++ b/model/Versioned.php @@ -764,7 +764,7 @@ class Versioned extends DataExtension { Versioned::reading_stage("Live"); } - if(!headers_sent()) { + if(!headers_sent() && !Director::is_cli()) { if(Versioned::current_stage() == 'Live') { Cookie::set('bypassStaticCache', null, 0, null, null, false, true /* httponly */); } else {