From 344d6e173cd5b1f78552be462d272396c7827f42 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 16 Oct 2008 05:29:32 +0000 Subject: [PATCH] HTTP:add_cache_headers() - don't throw warning when not passed git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64368 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/HTTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/HTTP.php b/core/HTTP.php index ba897debd..28d4225af 100644 --- a/core/HTTP.php +++ b/core/HTTP.php @@ -280,7 +280,7 @@ class HTTP { */ static function add_cache_headers($body = null) { // Validate argument - if(!($body instanceof HTTPResponse)) { + if($body && !($body instanceof HTTPResponse)) { user_error("HTTP::add_cache_headers() must be passed an HTTPResponse object", E_USER_WARNING); $body = null; }